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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nano_numwords-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ebf5e9cd203f3726936dd189e9ed1a172cd7e3cc12b9a884b596814e4be3609e
MD5 98fc4c759346f63d3ad5ac205ccd7481
BLAKE2b-256 4ebb82c0018ed5c6bda9d9513b656e0640691b0d56fae34031f7c2de364458c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nano_numwords-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2b3a822f061870478ddc7de94e54fa22046f4875587f67dfd0c08865305f6b7
MD5 7d7638213cea91d299eadae9094eac5d
BLAKE2b-256 69c19454c42f23e90c53a2387c582c706f662e0774df1e3c378eb85407ba9a3a

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