tf.raw_ops.InitializeTableFromTextFile
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
Initializes a table from a text file.
tf.raw_ops.InitializeTableFromTextFile(
    table_handle,
    filename,
    key_index,
    value_index,
    vocab_size=-1,
    delimiter='\t',
    offset=0,
    name=None
)
It inserts one key-value pair into the table for each line of the file.
The key and value is extracted from the whole line content, elements from the
split line based on delimiter or the line number (starting from zero).
Where to extract the key and value from a line is specified by key_index and
value_index.
- A value of -1 means use the line number(starting from zero), expects int64.
- A value of -2 means use the whole line content, expects string.
- A value >= 0 means use the index (starting at zero) of the split line based
on delimiter.
| Args | 
|---|
| table_handle | A Tensorof type mutablestring.
Handle to a table which will be initialized. | 
| filename | A Tensorof typestring. Filename of a vocabulary text file. | 
| key_index | An intthat is>= -2.
Column index in a line to get the tablekeyvalues from. | 
| value_index | An intthat is>= -2.
Column index that represents information of a line to get the tablevaluevalues from. | 
| vocab_size | An optional intthat is>= -1. Defaults to-1.
Number of elements of the file, use -1 if unknown. | 
| delimiter | An optional string. Defaults to"\t".
Delimiter to separate fields in a line. | 
| offset | An optional int. Defaults to0. | 
| name | A name for the operation (optional). | 
| Returns | 
|---|
| The created Operation. | 
  
  
 
  
    
    
      
       
    
    
  
  
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
  Last updated 2022-10-28 UTC.
  
  
  
    
      [null,null,["Last updated 2022-10-28 UTC."],[],[]]