ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

Module: tf.compat.v1.keras.preprocessing.text

Public API for tf.keras.preprocessing.text namespace.


class Tokenizer: Text tokenization utility class.


hashing_trick(...): Converts a text to a sequence of indexes in a fixed-size hashing space.

one_hot(...): One-hot encodes a text into a list of word indexes of size n.

text_to_word_sequence(...): Converts a text to a sequence of words (or tokens).

tokenizer_from_json(...): Parses a JSON tokenizer configuration file and returns a