$npx skillfedfor your agent

text2digits

A small library to convert text numbers to digits in a string

Worth itPyPI LinguisticReleased Apr 2026242.4K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — text2digits-0.1.2-py3-none-any.whl
v0.1.2 · released 2026-04-28 · Python >=3.7

Yes. The package is lightweight, actively maintained, has no dependencies, and solves a specific problem well—converting spoken/written number words to digits. It's particularly valuable if you work with speech-to-text pipelines. The MIT license imposes no restrictions. No known vulnerabilities. Install it if you need this conversion; skip it if your input is already numeric.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7 or later.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained as of 2026-04-28 with a recent commit history.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal attribution requirements.

last release 2026-04-28 (108 days) · last repo commit 2026-04-28 · 67 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 242,404 downloads/mo, #8,857 on PyPI

Verify before relying

pip install text2digits

from text2digits import text2digits
t2d = text2digits.Text2Digits()
result = t2d.convert("I am twenty nine years old")
print(result)  # 'I am 29 years old'
  • Whether the package handles all edge cases in production speech-to-text pipelines beyond the documented examples.
  • Performance characteristics when processing very long strings or batch operations.
  • Whether the similarity_threshold spelling correction feature is suitable for your use case's accuracy requirements.
Same gist for agents: .md · .json

What it is and what it does

text2digits is a lightweight Python library that recognizes number words written as text—like "twenty ten", "one thousand six hundred sixty six", or "negative thirty seven"—and replaces them with their numeric equivalents in a string. It handles both cardinal numbers (one, two, three) and ordinals (first, second, third), supports informal year-style concatenation ("twenty ten" becomes "2010"), and works with multiple number systems including the Indian scales (lakh, crore, arab, kharab). The library is designed for post-processing speech-to-text output, particularly from voice assistants like Alexa or Lex, where spoken numbers arrive as words and need to be normalized to digits.

The package has no runtime dependencies and installs as a pure Python wheel. It recognizes a wide variety of phrasings—both formal and conversational—and can correct minor spelling variations. Known limitations include that negative numbers preserve the word "negative" rather than converting to a minus sign, and ordinal suffixes are dropped by default ("third" becomes "3" not "3rd") unless explicitly enabled. Decimal literals adjacent to scale words are supported ("2.5 thousand" becomes "2500").

Use it for

  • Clean up Alexa or Lex transcription output where spoken numbers appear as words rather than digits.
  • Normalize user input from voice interfaces before storing or processing numeric data.
  • Parse informal written descriptions containing number words (e.g., chat logs, survey responses) into machine-readable form.
  • Convert year expressions in narrative text ("born in nineteen ninety two") to standard numeric format.
  • Handle ordinal references in text ("the fourth cousin") by converting them to digit form for indexing or comparison.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is lightweight, actively maintained, has no dependencies, and solves a specific problem well—converting spoken/written number words to digits. It's particularly valuable if you work with speech-to-text pipelines. The MIT license imposes no restrictions. No known vulnerabilities. Install it if you need this conversion; skip it if your input is already numeric.

Install

text2digits on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 2026-04-28 with a recent commit history.

Requires Python 3.7 or later.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal attribution requirements.

Quickstart

pip install text2digits

from text2digits import text2digits
t2d = text2digits.Text2Digits()
result = t2d.convert("I am twenty nine years old")
print(result)  # 'I am 29 years old'

Verify before relying

  • Whether the package handles all edge cases in production speech-to-text pipelines beyond the documented examples.
  • Performance characteristics when processing very long strings or batch operations.
  • Whether the similarity_threshold spelling correction feature is suitable for your use case's accuracy requirements.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 108 days since the last release
Last repo commit
First released
Downloads242,404 / month, #8,857 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: text2digits-0.1.2-py3-none-any.whl

Tags

Capabilities
convert text numbers to digitsnumber words to numeralstext to number conversionwritten numbers parserspeech-to-text number cleanupordinal and cardinal conversionnatural language number parsing
Topics
nlpspeech-to-texttext-normalization
PyPI keywords
text2numberswords2numbersdigitsnumbers

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “convert text numbers to digits”

  • text2digitsConverts written-out number words in text to their digit equivalents,…
  • kanjizeConverts between Japanese kanji number representations and integers,…
  • cn2anConverts between Chinese numerals and Arabic numerals in multiple…

Give your agent the search over MCP, or paste the wish link into any chat.

More Linguistic packages

charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
tiktoken Worth it
PyPI · Linguistic · released May 2026

tiktoken is a fast BPE tokenizer that converts text into token sequences compatible with OpenAI models, supporting multiple encoding schemes including o200k_base and model-specific encodings.

Install it if you work with OpenAI APIs or need to understand token boundaries in GPT-family models.

permissive licensecompiled wheel · 3.9+
233.0Mdownloads / mo
chardet Worth it
PyPI · Python Modules · released Aug 2026

Detects character encoding and language in byte sequences with high accuracy, supporting 99 encodings and returning confidence scores, language tags, and MIME types.

Install it if you need to detect character encoding or language in byte data; the rewrite makes it substantially faster and more accurate than its predecessors.

0BSDpure Python · 3.10+
199.0Mdownloads / mo
text-unidecode With conditions
PyPI · Python Modules · released Aug 2019

Converts Unicode text to ASCII by transliterating non-ASCII characters into their closest ASCII equivalents, with no runtime dependencies.

However, if transliteration quality or ongoing maintenance matters, consider unidecode instead despite its GPL-only license.

GPL-2.0-or-laterpure Pythonabandoned
89.0Mdownloads / mo
lark Worth it
PyPI · Python Modules · released Oct 2025

Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.

MITpure Python · 3.8+
79.7Mdownloads / mo
tree-sitter Worth it
PyPI · Linguistic · released Jun 2026

Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.

MITcompiled wheel · 3.10+
79.0Mdownloads / mo

See also text2num · unicode-rbnf · word2number · number-parser · kanjize · num2words · indic-numtowords · inflect · sigfig · luhn