parameters: (self, table)
return_statement: return init_op
docstring: Initializes the table from a text file.
  
      Args:
        table: The table to be initialized.
  
      Returns:
        The operation that initializes the table.
  
      Raises:
        TypeError: when the keys and values data types do not match the table
        key and value data types.
docstring_summary: Initializes the table from a text file.
docstring_tokens: Initializes the table from a text file .
function: def initialize(self, table):
      """Initializes the table from a text file.
  
      Args:
        table: The table to be initialized.
  
      Returns:
        The operation that initializes the table.
  
      Raises:
        TypeError: when the keys and values data types do not match the table
        key and value data types.
      """
      _check_table_dtypes(table, self.key_dtype, self.value_dtype)
      with ops.name_scope(self._name, "text_file_init",
                          (table.table_ref,)) as scope:
        filename = ops.convert_to_tensor(
            self._filename, dtypes.string, name="asset_filepath")
        # pylint: disable=protected-access
        init_op = gen_lookup_ops._initialize_table_from_text_file_v2(
            table.table_ref,
            filename,
            self._key_index,
            self._value_index,
            -1 if self._vocab_size is None else self._vocab_size,
            self._delimiter,
            name=scope)
        # pylint: enable=protected-access
      ops.add_to_collection(ops.GraphKeys.TABLE_INITIALIZERS, init_op)
      # If the filename tensor is anything other than a string constant (e.g., if
      # it is a placeholder) then it does not make sense to track it as an asset.
      if constant_op.is_constant(filename):
        ops.add_to_collection(ops.GraphKeys.ASSET_FILEPATHS, filename)
      return init_op
function_tokens: def initialize ( self , table ) : _check_table_dtypes ( table , self . key_dtype , self . value_dtype ) with ops . name_scope ( self . _name , "text_file_init" , ( table . table_ref , ) ) as scope : filename = ops . convert_to_tensor ( self . _filename , dtypes . string , name = "asset_filepath" ) # pylint: disable=protected-access init_op = gen_lookup_ops . _initialize_table_from_text_file_v2 ( table . table_ref , filename , self . _key_index , self . _value_index , - 1 if self . _vocab_size is None else self . _vocab_size , self . _delimiter , name = scope ) # pylint: enable=protected-access ops . add_to_collection ( ops . GraphKeys . TABLE_INITIALIZERS , init_op ) # If the filename tensor is anything other than a string constant (e.g., if # it is a placeholder) then it does not make sense to track it as an asset. if constant_op . is_constant ( filename ) : ops . add_to_collection ( ops . GraphKeys . ASSET_FILEPATHS , filename ) return init_op