word2number
Convert number words eg. three hundred and forty two to numbers (342).
What it is and what it does
word2number is a lightweight Python library that parses English number words and converts them to their numeric equivalents. It accepts written forms like "twenty one" or "two million three thousand" and returns the corresponding integer or decimal value. The package supports a range up to 999,999,999,999 and can handle both whole numbers and decimal points (e.g., "two point three" becomes 2.3).
The library has no runtime dependencies and is designed for straightforward text-to-number conversion tasks. However, it is no longer actively maintained—the last release was in 2017 and the repository shows no commits since August 2023. The package explicitly warns that an updated pip is required before installation, which suggests potential compatibility friction with modern Python environments. It is classified as Production/Stable but should be treated as a legacy tool.
Use it for:
- Parse user input in chatbots or voice interfaces that receive spoken or typed number words and need numeric values.
- Convert written numbers in documents or forms to digits for data processing or validation workflows.
- Educational applications that teach number recognition or conversion between word and numeric representations.
- Natural language processing pipelines that need to normalize number expressions in text before analysis.
- Data cleaning tasks where legacy text records contain spelled-out numbers that must be converted to numeric format.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts written-out number words (like "twenty one") into numeric digits (21), supporting positive integers and decimals up to 999,999,999,999.
No—install only if you have a legacy codebase already using it. The package is abandoned (no releases since 2017, last commit August 2023), has high install friction with explicit pip-update warnings, and lacks active maintenance. For new projects, consider a maintained alternative or implement the conversion logic directly, especially given the straightforward nature of the task.
Install
word2number on PyPI
pip
pip install word2numberuv
uv add word2numberpoetry
poetry add word2numberInstalling word2number
Before you install
High install friction reported; the package is abandoned (last commit 2023-08-17, no releases since 2017-06-02) and explicitly requires an updated pip before installation, suggesting potential compatibility issues with modern Python environments.
License in practice
MIT License (permissive) allows commercial and private use with minimal restrictions, requiring only that the original copyright notice and license text be included in distributions.
Quickstart
pip install word2number
from word2number import w2n
print(w2n.word_to_num("two million three thousand nine hundred and eighty four"))
# Output: 2003984
Package is abandoned and may have compatibility issues with modern Python versions; explicit pip update required before installation per documentation.
Verify before relying
- Whether the package works reliably with Python 3.6+ given its abandoned status and last release in 2017.
- What specific errors or edge cases occur with the high install friction; whether this is a known environment issue.
- Whether the package handles negative numbers despite the documentation stating it works for positive numbers only.
Package facts
| License | The MIT License (MIT) Copyright (c) 2016 Akshay Nagpal (https://github.com/akshaynagpal) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,360 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,691,266/month — #3,648 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: word2number-1.1.zip
Keywords: numbers, convert, words
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
text2digitsConverts written-out number words in text to…
permissive · top 15,000 on PyPI
number-parserConverts numbers written in natural language…
permissive · top 15,000 on PyPI
text2numConverts natural language number words into…
permissive · top 15,000 on PyPI
unicode-rbnfConverts numbers to spelled-out text in…
permissive · top 15,000 on PyPI
inflectGenerates correct English plurals, singulars,…
permissive · top 1,000 on PyPI
num2wordsConverts numbers to their word representations…
copyleft · top 5,000 on PyPI
indic-numtowordsConverts non-negative integers to their word…
permissive · top 15,000 on PyPI
pluralizerConverts English words between singular and…
permissive · top 15,000 on PyPI
roman-numeralsConverts between integers and Roman numerals,…
permissive · top 5,000 on PyPI
pyx12Pyx12 parses, validates, and converts ANSI X12…
permissive · top 15,000 on PyPI