parameters: (vocabulary_list,
                                        default_value="UNK",
                                        name=None)
docstring: Returns a lookup table that maps a `Tensor` of indices into strings.
  
    This operation constructs a lookup table to map int64 indices into string
    values. The mapping is initialized from a string `mapping` 1-D `Tensor` where
    each element is a value and the corresponding index within the tensor is the
    key.
  
    Any input which does not have a corresponding index in 'mapping'
    (an out-of-vocabulary entry) is assigned the `default_value`
  
    The underlying table must be initialized by calling
    `tf.tables_initializer.run()` or `table.init.run()` once.
  
    Elements in `mapping` cannot have duplicates, otherwise when executing the
    table initializer op, it will throw a `FailedPreconditionError`.
  
    Sample Usages:
  
    ```python
    vocabulary_list = tf.constant(["emerson", "lake", "palmer"])
    indices = tf.constant([1, 5], tf.int64)
    table = tf.contrib.lookup.index_to_string_table_from_tensor(
        vocabulary_list, default_value="UNKNOWN")
    values = table.lookup(indices)
    ...
    tf.tables_initializer().run()
  
    values.eval() ==> ["lake", "UNKNOWN"]
    ```
  
    Args:
      vocabulary_list: A 1-D string `Tensor` that specifies the strings to map
        from indices.
      default_value: The value to use for out-of-vocabulary indices.
      name: A name for this op (optional).
  
    Returns:
      The lookup table to map a string values associated to a given index `int64`
      `Tensors`.
  
    Raises:
      ValueError: when `vocabulary_list` is not set.
docstring_summary: Returns a lookup table that maps a `Tensor` of indices into strings.
docstring_tokens: Returns a lookup table that maps a Tensor of indices into strings .
function: def index_to_string_table_from_tensor(vocabulary_list,
                                        default_value="UNK",
                                        name=None):
    """Returns a lookup table that maps a `Tensor` of indices into strings.
  
    This operation constructs a lookup table to map int64 indices into string
    values. The mapping is initialized from a string `mapping` 1-D `Tensor` where
    each element is a value and the corresponding index within the tensor is the
    key.
  
    Any input which does not have a corresponding index in 'mapping'
    (an out-of-vocabulary entry) is assigned the `default_value`
  
    The underlying table must be initialized by calling
    `tf.tables_initializer.run()` or `table.init.run()` once.
  
    Elements in `mapping` cannot have duplicates, otherwise when executing the
    table initializer op, it will throw a `FailedPreconditionError`.
  
    Sample Usages:
  
    ```python
    vocabulary_list = tf.constant(["emerson", "lake", "palmer"])
    indices = tf.constant([1, 5], tf.int64)
    table = tf.contrib.lookup.index_to_string_table_from_tensor(
        vocabulary_list, default_value="UNKNOWN")
    values = table.lookup(indices)
    ...
    tf.tables_initializer().run()
  
    values.eval() ==> ["lake", "UNKNOWN"]
    ```
  
    Args:
      vocabulary_list: A 1-D string `Tensor` that specifies the strings to map
        from indices.
      default_value: The value to use for out-of-vocabulary indices.
      name: A name for this op (optional).
  
    Returns:
      The lookup table to map a string values associated to a given index `int64`
      `Tensors`.
  
    Raises:
      ValueError: when `vocabulary_list` is not set.
    """
  
    if vocabulary_list is None:
      raise ValueError("vocabulary_list must be specified.")
  
    with ops.name_scope(name, "index_to_string") as scope:
      vocabulary_list = ops.convert_to_tensor(vocabulary_list, dtypes.string)
      num_elements = array_ops.size(vocabulary_list)
      keys = math_ops.to_int64(math_ops.range(num_elements))
  
      shared_name = ""
      init = KeyValueTensorInitializer(
          keys, vocabulary_list, dtypes.int64, dtypes.string, name="table_init")
      # TODO(yleon): Use a more effienct structure.
      return HashTable(init, default_value, shared_name=shared_name, name=scope)
function_tokens: def index_to_string_table_from_tensor ( vocabulary_list , default_value = "UNK" , name = None ) : if vocabulary_list is None : raise ValueError ( "vocabulary_list must be specified." ) with ops . name_scope ( name , "index_to_string" ) as scope : vocabulary_list = ops . convert_to_tensor ( vocabulary_list , dtypes . string ) num_elements = array_ops . size ( vocabulary_list ) keys = math_ops . to_int64 ( math_ops . range ( num_elements ) ) shared_name = "" init = KeyValueTensorInitializer ( keys , vocabulary_list , dtypes . int64 , dtypes . string , name = "table_init" ) # TODO(yleon): Use a more effienct structure. return HashTable ( init , default_value , shared_name = shared_name , name = scope )