From f7dbb94cf8f6526d417bc7fe0350dada17f1f2f8 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 26 Dec 2022 11:40:14 +0200 Subject: [PATCH] remove method --- .../data_generator/presidio_data_generator.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/presidio_evaluator/data_generator/presidio_data_generator.py b/presidio_evaluator/data_generator/presidio_data_generator.py index bc3b843..4360020 100644 --- a/presidio_evaluator/data_generator/presidio_data_generator.py +++ b/presidio_evaluator/data_generator/presidio_data_generator.py @@ -125,25 +125,6 @@ class PresidioDataGenerator: lines = [line.replace("\\n", "\n") for line in lines] return lines - @staticmethod - def _prep_templates(raw_templates): - print("Preparing sample sentences for ingestion") - - def make_lower_case(match_obj): - if match_obj.group() is not None: - return match_obj.group().lower() - - templates = [ - ( - re.sub(r"\[.*?\]", make_lower_case, template.strip()) - .replace("[", "{" + "{") - .replace("]", "}" + "}") - ) - for template in raw_templates - ] - - return templates - def generate_fake_data( self, templates: List[str], n_samples: int ) -> Union[Generator[FakerSpansResult, None, None], Generator[str, None, None]]: