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.

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

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.2.tar.gz (2.7 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.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moore_num-0.1.2.tar.gz
  • Upload date:
  • Size: 2.7 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.2.tar.gz
Algorithm Hash digest
SHA256 8cac67f7ba442f77f6af4412851461bc39cd06c2c4c66dfe9dfb5a777f9b47b5
MD5 1f646ae60c23741112c43ce4371da013
BLAKE2b-256 5d3a00631962cedee981743790cb3acd21c86868fd515c3bed492edcd6902bd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moore_num-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61ff6beb435fa95eff2169e62f6e92fce279433893a6290df63d65cacb79acdc
MD5 3e78955bd5ebe2d8912e2ecd3e136bb1
BLAKE2b-256 57f71af353b52fa607b1224f996a0504d05f1e0f62cc725dd294e8f4d8ac0192

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