Skip to main content

Tiny English word→number parser in ~1KB

Project description

nano-numwords

PyPI License Size CI

World’s tiniest (yet practical) English word → number parser. Zero dependencies. Single ~1KB file. Perfect for code-golf, minimal environments, or just for fun.


✨ Features

  • ✅ Units, teens, tens (four, thirteen, sixty)
  • hundred, thousand
  • milliondecillion (10^6 … 10^33)
  • minus/negative, hyphenated words
  • ✅ Decimals with point (one point zero five1.05)

🚀 Usage

# CLI
python app_min.py "seven hundred eighty six"              # 786
python app_min.py "two million"                           # 2000000
python app_min.py "one trillion"                          # 1000000000000
python app_min.py "seven hundred sixty five thousand twelve"  # 765012
python app_min.py "negative forty two"                    # -42
python app_min.py "one point zero zero five"              # 1.005

or, after installing:

pip install nano-numwords
nano-numwords "forty two"   # -> 42

🤓 Why so small?

  • Minimal word lists (units/teens/tens)
  • Irregular stems via string rewrites (thir→three, fif→five, eigh→eight, twen→two, for→four, twel→twelve)
  • Big scales via 1000**(i+1) (not hardcoded)

🎉 Fun Ideas

  • Put it in your coding golf repo and brag: “My parser fits in a tweet.”
  • Ship it to a NASA spacecraft (disk quota friendly).
  • Teach your AI overlords to count with 1KB of Python.

📜 License

MIT © 2025

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nano_numwords-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nano_numwords-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file nano_numwords-0.1.0.tar.gz.

File metadata

  • Download URL: nano_numwords-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for nano_numwords-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9aa267cc88edb0bda81e0505b70aa870f57ea6a650c89cb87c9bdc4a7be17ddd
MD5 e61e5360d37835b1bbc457472852e73d
BLAKE2b-256 821369f6caf035f633d5d0aba8e273827ec6366672efbc141614ff9c12b26fc8

See more details on using hashes here.

File details

Details for the file nano_numwords-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nano_numwords-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for nano_numwords-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d580542e7ee1dc42399feef913eeee0380b82a8f419991ba75874a79eced743
MD5 51908d76e3deecd92b03a5fc04a93055
BLAKE2b-256 354643c13330f47cbb7ab5950c5007873e9c247285a2dcb2280c547ec4bca083

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page