tf.keras.preprocessing.text.tokenizer_from_json
Stay organized with collections
Save and categorize content based on your preferences.
Parses a JSON tokenizer configuration and returns a tokenizer instance.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
`tf.compat.v1.keras.preprocessing.text.tokenizer_from_json`
tf.keras.preprocessing.text.tokenizer_from_json(
json_string
)
Args |
json_string
|
JSON string encoding a tokenizer configuration.
|
Returns |
A Keras Tokenizer instance
|
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tf.keras.preprocessing.text.tokenizer_from_json\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/keras-team/keras/tree/v2.9.0/keras/preprocessing/text.py#L546-L581) |\n\nParses a JSON tokenizer configuration and returns a tokenizer instance.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n\\`tf.compat.v1.keras.preprocessing.text.tokenizer_from_json\\`\n\n\u003cbr /\u003e\n\n tf.keras.preprocessing.text.tokenizer_from_json(\n json_string\n )\n\n| **Deprecated:** [`tf.keras.preprocessing.text.Tokenizer`](../../../../tf/keras/preprocessing/text/Tokenizer) does not operate on tensors and is not recommended for new code. Prefer [`tf.keras.layers.TextVectorization`](../../../../tf/keras/layers/TextVectorization) which provides equivalent functionality through a layer which accepts [`tf.Tensor`](../../../../tf/Tensor) input. See the [text loading tutorial](https://www.tensorflow.org/tutorials/load_data/text) for an overview of the layer and text handling in tensorflow.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------|-------------------------------------------------|\n| `json_string` | JSON string encoding a tokenizer configuration. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A Keras Tokenizer instance ||\n\n\u003cbr /\u003e"]]