Module: tf.keras.preprocessing

Keras data preprocessing utils.

tokenizer = tf.keras.preprocessing.text.Tokenizer(num_words=5000)
tokenizer.fit_on_texts(texts)

This module is a wrapper around the keras_preprocessing package.

Additional documentation can be found on the keras site