# tensorflow/text

Making text a first-class citizen in TensorFlow.

Repository: https://github.com/tensorflow/text
Canonical: https://ross.abutalabs.com/products/tensorflow-text
Homepage: https://www.tensorflow.org/beta/tutorials/tensorflow_text/intro
Language: C++
License: Apache-2.0
License Family: permissive
Last push: 2026-08-25T13:05:46+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 2653, "days_push": 8, "days_rel": 12, "gap_med": 108, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1293, forks 378 (observed 2026-08-28T04:04:16.178048+00:00)

## What it is
TensorFlow Text is a library of text-processing classes and ops for TensorFlow 2.x, providing tokenization, Unicode normalization, n-grams, and other sequence-modeling preprocessing that runs inside the TensorFlow graph. It ensures preprocessing is identical between training and inference and underpins higher-level libraries like KerasNLP.

## Use cases
- tokenize text for tensorflow models
- unicode normalization and script segmentation in a tf graph
- preprocess text for bert fine-tuning
- build n-grams and sliding windows for sequence models
- avoid train/inference tokenization mismatch
- wordshape feature extraction in tensorflow

## When to choose
- you need low-level text ops inside the TensorFlow graph
- you must guarantee identical preprocessing at training and serving time
- KerasNLP abstractions are too high-level for your needs

## When to avoid
- you use PyTorch or JAX instead of TensorFlow
- you just want pretrained NLP models - use KerasNLP or Hugging Face instead
- you need general-purpose NLP outside a TensorFlow pipeline

## Facets
- artifact type: library
- maturity: maintenance
- function: nlp, machine-learning, parser, serialization
- domain: machine-learning, deep-learning
- platform: python, windows
- tags: tokenization, unicode, tensorflow, text-preprocessing, keras, natural-language-processing, linux, macos, gpu

## Member repositories
- tensorflow/text (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:16.178048+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:54:43.207761+00:00, confidence not recorded.
  - readme: https://github.com/tensorflow/text (fetched 2026-08-28T04:04:16.178048+00:00, sha 105ad0c17888)
  - homepage: https://www.tensorflow.org/beta/tutorials/tensorflow_text/intro (fetched 2026-08-29T12:11:11.618914+00:00, sha 7759392282fc)
  - site_page: https://www.tensorflow.org/install (fetched 2026-08-29T12:11:11.621576+00:00, sha 584a762da891)
  - site_page: https://www.tensorflow.org/tfx/api_docs (fetched 2026-08-29T12:11:11.625152+00:00, sha 6977825696fe)
  - site_page: https://www.tensorflow.org/about (fetched 2026-08-29T12:11:11.628658+00:00, sha 817250744d91)
  - site_page: https://www.tensorflow.org/about/case-studies (fetched 2026-08-29T12:11:11.630935+00:00, sha e6701029eec0)
  - site_page: https://www.tensorflow.org/about/bib (fetched 2026-08-29T12:11:11.633278+00:00, sha 5ca8943386b9)
  - site_page: https://www.tensorflow.org/community/contribute (fetched 2026-08-29T12:11:11.626795+00:00, sha 77d394fa76e7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
