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.2.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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nano_numwords-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bfc2a9503a42a367771dcec7915297eba9f8b81f7786f7109fd6dce0cdfaa575
MD5 c11d017be73e0593fc3f971d5342b16f
BLAKE2b-256 7979d467c7a6658bf1c0465aa76b67ea57efad43db7ed85187f740a2d2c29193

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nano_numwords-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c4d42258aa6073ed0c7454a5d0e8ef7907f67bd1ec61395bc6728f30525eb7bd
MD5 9e30da32e260f32e7886253aef8c2581
BLAKE2b-256 3627c52e60345c9d0a249619abeae3f2c2770d67896dbf4ad0007d90d34ffb2b

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