class_docstr: Text embedding model.
  
  A text embeddings model that takes a sentences on input and outputs the
  sentence embedding.
class_docstr_tok: ["Text","embedding","model",".","A","text","embeddings","model","that","takes","a","sentences","on","input","and","outputs","the","sentence","embedding","."]
code: def _tokenize(self, sentences):
      # Perform a minimalistic text preprocessing by removing punctuation and
      # splitting on spaces.
      normalized_sentences = tf.strings.regex_replace(
          input=sentences, pattern=r"\pP", rewrite=""
      )
      normalized_sentences = tf.reshape(normalized_sentences, [-1])
      sparse_tokens = tf.strings.split(
          normalized_sentences, " "
      ).to_sparse()
  
      # Deal with a corner case: there is one empty sentence.
      sparse_tokens, _ = tf.sparse.fill_empty_rows(
          sparse_tokens, tf.constant("")
      )
      # Deal with a corner case: all sentences are empty.
      sparse_tokens = tf.sparse.reset_shape(sparse_tokens)
      sparse_token_ids = self._table.lookup(sparse_tokens.values)
  
      return (
          sparse_tokens.indices,
          sparse_token_ids,
          sparse_tokens.dense_shape,
      )
  
file_path: hub/examples/text_embeddings_v2/export_v2.py
imports: import argparse
  import os
  import sys
  import tempfile
  from absl import app
  import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling the TextEmbeddingModel obj's underlying member method code with example usage: obj._tokenize(sentences) and returns: sparse_tokens,  sparse_token_ids,  sparse_tokens