number-parser
parse numbers written in natural language
Decision gist · record as of 2026-08-14
Yes—if you need to parse written numbers in English, Hindi, Spanish, Ukrainian, or Russian. The library is stable, has no security vulnerabilities, and installs with minimal friction. Dormant maintenance is a minor concern for long-term support, but the code is straightforward and unlikely to break with Python updates. Not worth installing if you only need English and have simpler regex-based solutions in place, or if you need ordinal/fraction support in languages other than English.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction—pure Python wheel with a single dependency (attrs).
- Dormant maintenance since March 2023, but the repository is not archived and the last commit is recent (October 2024), suggesting occasional updates.
- Stable for production use if your language and number-type needs align with what's supported.
License · maintenance · safety
permissive license (permissive) — Permissive BSD license; no restrictions on commercial or proprietary use.
last release 2023-03-28 (1235 days) · last repo commit 2024-10-23 · 129 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 680,804 downloads/mo, #5,365 on PyPI
Alternatives
Verify before relying
pip install number-parser
from number_parser import parse, parse_number
parse("I have two hats and thirty seven coats")
# 'I have 2 hats and 37 coats'
parse_number("two thousand and twenty")
# 2020- Whether the library handles edge cases in languages other than English (e.g., grammatical variations, regional dialects) as robustly as English.
- Performance characteristics on very long texts or texts with many embedded numbers.
- Whether ordinal and fraction parsing work reliably for all supported number ranges.
What it is and what it does
number-parser is a text-to-number converter that identifies and transforms written numbers in natural language into their numeric equivalents. It handles cardinal numbers ("twenty three" → 23), ordinal numbers ("twenty third" → 23), and fractions ("one over two" → "1/2") in English, and cardinal numbers in Hindi, Spanish, Ukrainian, and Russian. The library provides three main functions: parse() to convert numbers in-place within a text string, parse_number() to convert a single written number, and parse_ordinal() and parse_fraction() for specialized cases.
The package depends only on attrs and installs as a pure Python wheel with low friction. It is marked Production/Stable and supports Python 3.7 through 3.11. Maintenance is dormant (no releases since March 2023), though the repository remains active. The library handles ambiguous cases and language-specific nuances, making it suitable for data extraction, form processing, and NLP pipelines where written numbers must be normalized to numeric form.
Use it for
- Extract and normalize written numbers from unstructured text or user input in multilingual documents.
- Convert ordinal text ("first", "second", "twenty third") to integers for ranking or ordering tasks.
- Parse fractional expressions written in words for mathematical or scientific data processing.
- Preprocess text data for NLP or machine learning pipelines that require numeric normalization.
- Build chatbots or voice assistants that accept spoken/written numbers and need to convert them to machine-readable form.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes—if you need to parse written numbers in English, Hindi, Spanish, Ukrainian, or Russian.
The library is stable, has no security vulnerabilities, and installs with minimal friction. Dormant maintenance is a minor concern for long-term support, but the code is straightforward and unlikely to break with Python updates. Not worth installing if you only need English and have simpler regex-based solutions in place, or if you need ordinal/fraction support in languages other than English.
Install
number-parser on PyPI
Before you install
Low friction—pure Python wheel with a single dependency (attrs). Dormant maintenance since March 2023, but the repository is not archived and the last commit is recent (October 2024), suggesting occasional updates. Stable for production use if your language and number-type needs align with what's supported.
License in practice
Permissive BSD license; no restrictions on commercial or proprietary use.
Quickstart
pip install number-parser
from number_parser import parse, parse_number
parse("I have two hats and thirty seven coats")
# 'I have 2 hats and 37 coats'
parse_number("two thousand and twenty")
# 2020
Verify before relying
- Whether the library handles edge cases in languages other than English (e.g., grammatical variations, regional dialects) as robustly as English.
- Performance characteristics on very long texts or texts with many embedded numbers.
- Whether ordinal and fraction parsing work reliably for all supported number ranges.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageattrs |
| Maintenance | Dormant 1,235 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 680,804 / month, #5,365 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/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: number_parser-0.3.2-py2.py3-none-any.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 › “ordinal number parsing”
- number-parserConverts numbers written in natural language (e.g., "twenty three")…
- text2numConverts natural language number words into their digit…
- text2digitsConverts written-out number words in text to their digit equivalents,…
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 num2words · parse-type · text2digits · word2number · unicode-rbnf · text2num · recognizers-text-number · indic-numtowords · spanishconjugator · numerize