Google I/O is a wrap! Catch up on TensorFlow sessions View sessions

API reference for text and NLP libraries.

TensorFlow Text

API reference

The tensorflow_text package provides a collection of text related classes and ops ready to use with TensorFlow. The library can perform the preprocessing regularly required by text-based models, and includes other features useful for sequence modeling not provided by core TensorFlow.

For installation details, refer to the the guide

TensorFlow Models - NLP

API reference

The TensorFlow Models repository provides implementations of state-of-the-art (SOTA) models. The tensorflow-models-official pip package includes many high-level functions and classes for building SOTA NLP models including nlp.layers, nlp.losses, nlp.models and nlp.tasks.

You can install the package with pip:

$ pip install tensorflow-models-official  # For the latest release
$ #or
$ pip install tf-models-nightly # For the nightly build

The NLP functionality is available in the tfm.nlp submodule.

import tensorflow_models as tfm
tfm.nlp