Word Number Converter
A lightweight, multi-language Python library for converting numbers to words and words back to numbers.
It supports multiple human languages, Chinese numeral systems, and Roman numerals, all through a simple API.
✨ Features
- Convert integers to words in multiple languages
- Convert words back to integers (where supported)
- Chinese number systems:
- Simplified
- Traditional
- Financial
- Roman numeral conversion
- Handles negative numbers
- No external dependencies
🌍 Supported Languages
Number → Words
- English (
en) - Chinese (
zh) - Spanish (
es) - French (
fr) - German (
de) - Swahili (
sw) - Japanese (
ja) - Arabic (
ar) - Roman numerals
Words → Number
- English (
en) - Chinese (
zh) - Roman numerals (
roman)
⚠️ Reverse conversion is not yet implemented for all languages.
📦 Installation
pip install word-number-converter
🚀 Quick Start
from word_number_converter import WordNumberConverter
converter = WordNumberConverter()
Number to Words
converter.number_to_words(123)
# "one hundred twenty-three"
converter.number_to_words(456, lang="es")
# "cuatrocientos cincuenta y seis"
converter.number_to_words(789, lang="fr")
# "sept cent quatre-vingt-neuf"
converter.number_to_words(2024, lang="zh", system="simplified")
# "二千零二十四"
converter.number_to_words(-15, lang="de")
# "minus fünfzehn"
Words to Number
converter.words_to_number("one hundred twenty three")
# 123
converter.words_to_number("一百二十三", lang="zh")
# 123
converter.words_to_number("MCMXCIV", lang="roman")
# 1994
Roman Numerals
converter.number_to_roman(1994)
# "MCMXCIV"
converter.roman_to_number("XLII")
# 42
🀄 Chinese Number Systems
converter.number_to_words(1024, lang="zh", system="simplified")
# 一千零二十四
converter.number_to_words(1024, lang="zh", system="traditional")
# 一千零二十四
converter.number_to_words(1024, lang="zh", system="financial")
# 壹仟零贰拾肆
Supported systems:
simplifiedtraditionalfinancial
🧠 Design Notes
- Focused on correctness and readability over linguistic edge cases
- Designed for NLP preprocessing, localization, and educational use
- No third-party dependencies
- Python ≥ 3.7
📄 License
👤 Author
Ricardo 📧 ricardo.devstudio@gmail.com
🔗 Links
Metadata
Release files for word-number-converter 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| word_number_converter-0.1.0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| word_number_converter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / word_number_converter-0.1.0.tar.gz
| Download URL | word_number_converter-0.1.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0addd806327ecd18d1d1be569e919f4d68541acea604482190d9368c495c4a62
|
|
BLAKE2b-256 checksum How to use checksums |
636473161fcf01e3bfd519dc4bb37fb7ec3c187a721e29b4f45f0a14119e4480
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / word_number_converter-0.1.0-py3-none-any.whl
| Download URL | word_number_converter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af40abe218624137eec5006a0e5f3f0591dc87054237ead4535fa3ee1284ab06
|
|
BLAKE2b-256 checksum How to use checksums |
8b267c4ee0067efc81bac7f5e9f30e988a95ffc708c879e862001b237967d316
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|