Skip to main content

A library to convert numbers to Mooré text and vice versa

Project description

moore_num

A Python library for converting numbers to Mooré (Mossi) language text and vice versa.

🚀 Try the interactive demo: num2text-playground.vercel.app

Features

  • Number to Mooré Text: Convert integers to their textual representation in Mooré.
  • Mooré Text to Number: Parse Mooré number phrases back into integers.
  • Money Mode: Special scaling factor (x5) for currency calculations common in Burkina Faso.
  • Support for Large Numbers: Handles units, tens, hundreds, thousands, millions, and billions.

Installation

pip install moore_num

Usage

Forward Conversion (Number to Text)

from moore_num import convert_to_text

# Standard conversion
print(convert_to_text(125)) 
# Output: "Koabga la pisi la a nu"

# Money mode (5 CFA = 1 unit in common counting)
print(convert_to_text(500, is_money=True))
# Output: "Koabga"

Reverse Conversion (Text to Number)

from moore_num import text_to_num

# Standard reverse
print(text_to_num("Piig la a yii"))
# Output: 12

# Money mode reverse
print(text_to_num("Koabga", is_money=True))
# Output: 500

Command Line Interface

# Forward
num2moore 125

# Reverse
num2moore "Piig la a yii" --reverse

# Money mode
num2moore 500 --money

License

MIT

Citation

If you use this software in your research, please cite it using the following BibTeX format:

@software{moore_num,
  author = {Ouily, Hamed Joseph},
  title = {moore\_num: A Python library for converting numbers to Mooré text},
  url = {https://github.com/ohamjoseph/moore_num},
  year = {2026}
}

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

moore_num-0.1.8.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

moore_num-0.1.8-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file moore_num-0.1.8.tar.gz.

File metadata

  • Download URL: moore_num-0.1.8.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for moore_num-0.1.8.tar.gz
Algorithm Hash digest
SHA256 42a8cccab41a226f73d02b74242f6570a1ee041768822949eac9564db2e54906
MD5 2332809e4a9a404a51ce3d4ebfa57da4
BLAKE2b-256 16bf55bcfd7e6d56a1bbf17925940a579a71a18774d31db7d3e529c50f0fcf03

See more details on using hashes here.

File details

Details for the file moore_num-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: moore_num-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for moore_num-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fade347cecefdbbc1ddbbb12ad25e3971d1f318ba68bb2c83b6ac091378fcc69
MD5 4e460f1a12521557558bcf1a9ec9d9c9
BLAKE2b-256 3b2d4a6cda6858e89e2c924c860596ad6e5dc036f2ac969873231af3640353a5

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