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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for moore_num-0.1.7.tar.gz
Algorithm Hash digest
SHA256 69e8d89af847d8c6a2a223f7ddc5a052d9c1ddc4118f253001c808a0f579697c
MD5 a977487e9d9449687568722c69563e20
BLAKE2b-256 ebc0c35459f272d048d411512fbbb146baa82953cf48539b17d7afea66f6591a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moore_num-0.1.7-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.7

File hashes

Hashes for moore_num-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a77291f006a5e8461781bdd5dcd346701ffdd7dbc783cd8cabdaf16825ecc368
MD5 dc6f024d8a30512ca421002e8268dade
BLAKE2b-256 13381dec064482d3c5be72f834ab2b1118130b0b8e76bdda3f77c99792933718

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