# twitter/twitter-text

Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.

Repository: https://github.com/twitter/twitter-text
Canonical: https://ross.abutalabs.com/products/twitter-text
Homepage: https://developer.twitter.com/en/docs/counting-characters
Language: HTML
License: Apache-2.0
License Family: permissive
Topics: twitter-text, tweet, twitter, unicode, emoji, java, ruby, nodejs, objective-c
Last push: 2024-04-26T09:15:03+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4291, "days_push": 859, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3139, forks 531 (observed 2026-08-28T04:07:45.800445+00:00)

## What it is
A collection of official Twitter libraries and conformance tests for parsing and tokenizing Tweet text. It determines character counts and identifies URLs, @usernames, #hashtags, and $cashtags in text.

## Use cases
- count characters in a tweet correctly with weighted unicode and emoji
- extract hashtags and cashtags from tweet text
- auto-link @mentions and URLs in tweets
- validate tweet length before posting via the API
- parse tweet entities in Java, Ruby, JavaScript, or Objective-C

## When to choose
- you need Twitter/X-compatible tweet text parsing and character counting
- you want conformance-tested implementations across multiple languages
- you're building a Twitter client or posting tool

## When to avoid
- you need general-purpose NLP beyond tweet text parsing
- you need actively developed features for new X platform changes
- your language isn't Java, Ruby, JavaScript, or Objective-C and you can't use community ports

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, nlp, serialization
- domain: social-media, developer-tools, apis
- platform: jvm, ruby, cross-platform
- tags: twitter, tweet-parsing, unicode, emoji, text-extraction, conformance-tests, hashtags, mentions, natural-language-processing, nodejs

## Member repositories
- twitter/twitter-text (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:45.800445+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-29T18:45:36.448042+00:00, confidence not recorded.
  - readme: https://github.com/twitter/twitter-text (fetched 2026-08-28T04:07:45.800445+00:00, sha 6049a43df0c9)
  - homepage: https://developer.twitter.com/en/docs/counting-characters (fetched 2026-08-29T09:40:45.042740+00:00, sha 64b528ff59ff)
- Data as of 2026-08-30T08:39:29.467469+00:00.
