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 __init__(
      self,
      vocab_file_path,
      oov_buckets,
      num_lines_to_ignore=0,
      num_lines_to_use=None,
  ):
      super().__init__()
      self._vocabulary, self._pretrained_vectors = load(
          vocab_file_path,
          parse_line,
          num_lines_to_ignore,
          num_lines_to_use,
      )
      self._oov_buckets = oov_buckets
      # Assign the table initializer to this instance to ensure the asset
      # it depends on is saved with the SavedModel.
      self._table_initializer = tf.lookup.TextFileInitializer(
          write_vocabulary_file(self._vocabulary),
          tf.string,
          tf.lookup.TextFileIndex.WHOLE_LINE,
          tf.int64,
          tf.lookup.TextFileIndex.LINE_NUMBER,
      )
      self._table = tf.lookup.StaticVocabularyTable(
          self._table_initializer, num_oov_buckets=oov_buckets
      )
      oovs = np.zeros([oov_buckets, self._pretrained_vectors.shape[1]])
      self._pretrained_vectors = np.resize(
          self._pretrained_vectors,
          [
              self._pretrained_vectors.shape[0] + oov_buckets,
              self._pretrained_vectors.shape[1],
          ],
      )
      self._pretrained_vectors[
          self._pretrained_vectors.shape[0] - oov_buckets :, :
      ] = oovs
      self.embeddings = tf.Variable(self._pretrained_vectors)
      self.variables = [self.embeddings]
      self.trainable_variables = self.variables
  
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 1 to create a new TextEmbeddingModel object from inherited base classes: tf.train with example: obj = TextEmbeddingModel(vocab_file_path, oov_buckets, num_lines_to_ignore, num_lines_to_use)