tensorflow / 2.9.1 / keras / preprocessing / text.html /

Module: tf.keras.preprocessing.text

Utilities for text input preprocessing.

Classes

class Tokenizer: Text tokenization utility class.

Functions

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 and returns a tokenizer instance.

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/keras/preprocessing/text