# tf.lookup.TextFileIndex

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/lookup/TextFileIndex) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/ops/lookup_ops.py#L477-L493) |

The key and value content to get from each line.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.lookup.TextFileIndex`](https://www.tensorflow.org/api_docs/python/tf/lookup/TextFileIndex)

<br />

This class defines the key and value used for tf.lookup.TextFileInitializer.

The key and value content to get from each line is specified either
by the following, or a value `>=0`.

- [`TextFileIndex.LINE_NUMBER`](https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/lookup/TextFileIndex#LINE_NUMBER) means use the line number starting from zero, expects data type int64.
- [`TextFileIndex.WHOLE_LINE`](https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/lookup/TextFileIndex#WHOLE_LINE) means use the whole line content, expects data type string.

A value `>=0` means use the index (starting at zero) of the split line based
on `delimiter`.

## Class Variables

- `LINE_NUMBER = -1`
- `WHOLE_LINE = -2`