From a1e1b5d34cb52850dbeaa1b324d531b47d6bef6d Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Fri, 13 Oct 2023 14:21:14 -0700 Subject: [PATCH] Internal change. PiperOrigin-RevId: 573318330 --- .../model_maker/python/text/text_classifier/preprocessor.py | 1 - .../model_maker/python/text/text_classifier/text_classifier.py | 1 - 2 files changed, 2 deletions(-) diff --git a/mediapipe/model_maker/python/text/text_classifier/preprocessor.py b/mediapipe/model_maker/python/text/text_classifier/preprocessor.py index 24130f6f8a..5c3b769c8f 100644 --- a/mediapipe/model_maker/python/text/text_classifier/preprocessor.py +++ b/mediapipe/model_maker/python/text/text_classifier/preprocessor.py @@ -145,7 +145,6 @@ def get_vocab(self) -> Mapping[str, int]: """Returns the vocab of the AverageWordEmbeddingClassifierPreprocessor.""" return self._vocab - # TODO: Align with MediaPipe's RegexTokenizer. def _regex_tokenize(self, text: str) -> Sequence[str]: """Splits `text` by words but does not split on single quotes. diff --git a/mediapipe/model_maker/python/text/text_classifier/text_classifier.py b/mediapipe/model_maker/python/text/text_classifier/text_classifier.py index 623edbc386..348f4cfb63 100644 --- a/mediapipe/model_maker/python/text/text_classifier/text_classifier.py +++ b/mediapipe/model_maker/python/text/text_classifier/text_classifier.py @@ -353,7 +353,6 @@ def _get_metadata_writer(self, tflite_model: bytearray, vocab_filepath: str): return text_classifier_writer.MetadataWriter.create_for_regex_model( model_buffer=tflite_model, regex_tokenizer=metadata_writer.RegexTokenizer( - # TODO: Align with MediaPipe's RegexTokenizer. delim_regex_pattern=self._DELIM_REGEX_PATTERN, vocab_file_path=vocab_filepath), labels=metadata_writer.Labels().add(list(self._label_names)))