text2num
Parse and convert numbers written in French, Spanish, English, Portuguese, German, Dutch or Italian into their digit representation.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, supports current Python versions, and solves a specific multilingual parsing problem with zero runtime dependencies. Install friction is moderate but manageable via precompiled wheels. The permissive license and stable API make it suitable for production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; macOS support begins at Python 3.11.
- Medium install friction due to compiled wheels, but precompiled binaries are provided for Linux, macOS, and Windows across multiple architectures and Python versions (3.8–3.13), making installation straightforward on supported platforms.
- Repository is actively maintained with recent commits.
License · maintenance · safety
permissive license (permissive) — Permissive license allows use in commercial and open-source projects without restriction.
last release 2026-05-27 (79 days) · last repo commit 2026-06-15 · 119 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 685,181 downloads/mo, #5,355 on PyPI
Alternatives
Verify before relying
pip install text2num
from text2num import text2num
result = text2num('ninety-five', 'en')
print(result) # 95- Whether the Rust implementation provides measurable performance gains over the retired 2.X pure-Python version.
- Whether speech-to-text token stream processing is production-ready or experimental.
- Exact license identifier (MIT indicated by classifier but not confirmed in metadata).
What it is and what it does
text2num is a parser library that recognizes and converts numbers written as natural language words into their integer or decimal digit equivalents. It supports seven languages: Dutch, English, French, German, Italian, Portuguese, and Spanish. The library handles cardinal numbers (e.g., 'ninety-five'), ordinals (e.g., 'fifth'), and decimal numbers (e.g., 'twelve point five'). The implementation is based on a Rust algorithm, providing low resource and energy consumption with small latency, and precompiled wheels are provided so you don't need to compile Rust yourself.
The package offers two main functions: direct conversion of word strings to numbers, and finding and transcribing all numbers within larger text passages. It operates in a relaxed parsing mode by default, tolerating punctuation and spacing variations in the input. There are no external runtime dependencies, making it lightweight and suitable for embedded or resource-constrained environments.
Use it for
- Convert spoken or transcribed numbers in customer service or voice-to-text workflows into standardized digit format.
- Parse invoice or contract text to extract numerical amounts written in words for data entry or validation.
- Process multilingual documents to normalize number representations for downstream analysis or database storage.
- Build chatbots or voice assistants that need to understand number words in multiple languages.
- Validate or clean datasets containing mixed text and number formats across international sources.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, supports current Python versions, and solves a specific multilingual parsing problem with zero runtime dependencies. Install friction is moderate but manageable via precompiled wheels. The permissive license and stable API make it suitable for production use.
Install
text2num on PyPI
Before you install
Medium install friction due to compiled wheels, but precompiled binaries are provided for Linux, macOS, and Windows across multiple architectures and Python versions (3.8–3.13), making installation straightforward on supported platforms. Repository is actively maintained with recent commits.
Requires Python 3.8 or later; macOS support begins at Python 3.11.
License in practice
Permissive license allows use in commercial and open-source projects without restriction.
Quickstart
pip install text2num
from text2num import text2num
result = text2num('ninety-five', 'en')
print(result) # 95
Verify before relying
- Whether the Rust implementation provides measurable performance gains over the retired 2.X pure-Python version.
- Whether speech-to-text token stream processing is production-ready or experimental.
- Exact license identifier (MIT indicated by classifier but not confirmed in metadata).
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 79 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 685,181 / month, #5,355 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseNatural Language :: DutchNatural Language :: EnglishNatural Language :: FrenchNatural Language :: GermanNatural Language :: ItalianNatural Language :: PortugueseNatural Language :: SpanishProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Text Processing :: FiltersTopic :: Text Processing :: Linguistic |
Evidence: text2num-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; text2num-3.0.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; text2num-3.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; text2num-3.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; text2num-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; text2num-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; text2num-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl; text2num-3.0.2-cp310-cp310-musllinux_1_2_armv7l.whl; text2num-3.0.2-cp310-cp310-musllinux_1_2_i686.whl; text2num-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl; text2num-3.0.2-cp310-cp310-win_amd64.whl; text2num-3.0.2-cp311-cp311-macosx_11_0_arm64.whl; text2num-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; text2num-3.0.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; text2num-3.0.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; text2num-3.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; text2num-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; text2num-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl; text2num-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl; text2num-3.0.2-cp311-cp311-musllinux_1_2_armv7l.whl
Tags
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 › “natural language number parsing”
- text2numConverts natural language number words into their digit…
- number-parserConverts numbers written in natural language (e.g., "twenty three")…
- word2numberConverts written-out number words (like "twenty one") into numeric…
Give your agent the search over MCP, or paste the wish link into any chat.
More Linguistic packages
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.
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.
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.
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.
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.
Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.
See also text2digits · num2words · word2number · number-parser · unicode-rbnf · indic-numtowords · recognizers-text-number · recognizers-text · bpemb · indic-nlp-library