Wolof numeral and currency phrase parser (range 1 to 1,000,000,000)
Project description
wolof-numbers
Wolof numeral and currency phrase parser. Parse Wolof cardinal numbers from 1 to 1,000,000,000 and currency phrases in XOF/FCFA/CFA. MIT-licensed, PyPI-published as v0.1.0.
Install
pip install wolof-numbers
Quick Start
from wolof_numbers import parse_number, parse_currency_amount, parse_strict
# Cardinal number
result = parse_number("ñaar junni")
print(result.value) # 2000
print(result.confidence) # 1.0
# Strict parsing (returns int, raises on ambiguity)
value = parse_strict("ñaar junni")
print(value) # 2000
# Currency phrase
amt = parse_currency_amount("ñaar junni franc CFA")
print(amt.amount) # 2000
print(amt.currency) # "XOF"
Supported Range
| Range | Status |
|---|---|
| 1 – 9 (ones) | Supported |
| 10 – 99 (tens) | Supported |
| 100 – 999 (hundreds) | Supported |
| 1,000 – 99,999 (thousands) | Supported |
| 100,000 – 999,999 | Supported |
| 1,000,000 – 1,000,000,000 | Supported |
Supported Forms
- Cardinals only in v0.1.0 —
benn(1),ñaar(2), …juróom-ñaar(7),fukk(10),téeméer(100),junni(1000) - Wolof↔French code-switching —
ñaar mille francsis parsed as 2000 XOF - Diacritic-insensitive input —
naar,NAAR,ñaarall resolve to canonicalñaar - ~100 orthographic aliases covering regional variants (Lebu, Saloum-Saloum, Northern cluster) and common ASR transcript variants
Known Limitations (v0.2 targets)
| Form | Example | v0.1.0 Behavior |
|---|---|---|
| Ordinals | ñaaréél (second) |
Raises UnsupportedNumeralForm(kind="ordinal") |
| Fractions | genn ci ñaar (one-half) |
Raises UnsupportedNumeralForm(kind="fraction") |
| Arabic loanwords | alfu (1000) |
Raises UnsupportedNumeralForm(kind="loanword") |
Stability
v0.x.y: public API is committed-to; internals are not. Breaking changes to the public API
will bump to 0.(x+1).0 with a migration note in CHANGELOG.
The public API surface consists of: parse, parse_strict, parse_number,
parse_currency_amount, normalize, ParseResult, AmountResult, Interpretation,
AmbiguityError, UnsupportedNumeralForm.
Linguistic Source
The cardinal numeral system is based on Guérin 2021 (Constance Guérin's linguistic research on Wolof numerals) and supplemented by jangawolof.org.
Contributing
Non-developers can extend the alias table by editing
wolof_numbers/data/aliases.yaml — no Python knowledge required. Each entry maps a
canonical Wolof orthography to a list of accepted variants. Open a PR with new variants
and a usage example.
License
MIT — see LICENSE. Copyright (c) 2026 Kuma Labs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wolof_numbers-0.2.1.tar.gz.
File metadata
- Download URL: wolof_numbers-0.2.1.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a147acf93f819f1f00ff0acf195006134b6ed2ea0e2e2ab387aaa0b43a5be3cc
|
|
| MD5 |
98f7fba06aaf12e0a575929cb8f9695b
|
|
| BLAKE2b-256 |
ba779f209928aface34aee05d0d4c67f18fedebbe36ba5b288f17ca67890cc8a
|
File details
Details for the file wolof_numbers-0.2.1-py3-none-any.whl.
File metadata
- Download URL: wolof_numbers-0.2.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
086fd0e42d3e31d66e08e52bea136253f925f91fb9bff438168e7688adced4c4
|
|
| MD5 |
6598c64a25abaceba54d8261148d12f6
|
|
| BLAKE2b-256 |
e2866e7b8e146d9e8a4e25793a949ae668d3b81a3181c3a4b17d91aa8514f023
|