Internal change.

PiperOrigin-RevId: 573318330
This commit is contained in:
MediaPipe Team 2023-10-13 14:21:14 -07:00 committed by Copybara-Service
parent 8993073f35
commit a1e1b5d34c
2 changed files with 0 additions and 2 deletions

View File

@ -145,7 +145,6 @@ class AverageWordEmbeddingClassifierPreprocessor:
"""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.

View File

@ -353,7 +353,6 @@ class _AverageWordEmbeddingClassifier(TextClassifier):
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)))