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.6.tar.gz (5.9 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.6-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moore_num-0.1.6.tar.gz
  • Upload date:
  • Size: 5.9 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.6.tar.gz
Algorithm Hash digest
SHA256 f39c9e86ed6eb8ac9538734566216d538a2829f955175e868e6948ec53a3d1a0
MD5 d65daa34c86184a19cc7337c3d9edd70
BLAKE2b-256 d90eedfda874ce492f4d700cd3fd56a1c0e069b6f2bb74a7526b0c9902863eb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moore_num-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d812667fd67fcd687751b27ac2e56e4e48ce369f66fede930efb3784ff6a3548
MD5 0aee20225c3d272f888e88876cce6c13
BLAKE2b-256 15ec48c3615c83db4e8d6f31ae75fa8ae4e8732cf192a97d70501d8f8be0613e

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