moore-num 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {moore_num-0.2.0 → moore_num-0.2.2}/PKG-INFO +29 -10
- moore_num-0.2.2/README.md +97 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num/__init__.py +1 -1
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num.egg-info/PKG-INFO +29 -10
- {moore_num-0.2.0 → moore_num-0.2.2}/setup.py +1 -1
- moore_num-0.2.0/README.md +0 -78
- {moore_num-0.2.0 → moore_num-0.2.2}/LICENSE +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num/cli.py +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num/converter.py +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num.egg-info/SOURCES.txt +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num.egg-info/dependency_links.txt +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num.egg-info/entry_points.txt +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/moore_num.egg-info/top_level.txt +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/setup.cfg +0 -0
- {moore_num-0.2.0 → moore_num-0.2.2}/test/test_converter.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moore_num
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A library to convert numbers to Mooré text and vice versa
|
|
5
5
|
Home-page: https://github.com/ohamjoseph/moore_num.git
|
|
6
6
|
Author: Hamed Joseph OUILY
|
|
@@ -35,8 +35,10 @@ A Python library for converting numbers to Mooré (Mossi) language text and vice
|
|
|
35
35
|
|
|
36
36
|
- **Number to Mooré Text**: Convert integers to their textual representation in Mooré.
|
|
37
37
|
- **Mooré Text to Number**: Parse Mooré number phrases back into integers.
|
|
38
|
-
- **Money Mode**:
|
|
39
|
-
- **Support for Large Numbers**: Handles units, tens, hundreds, thousands, millions, and billions.
|
|
38
|
+
- **Money Mode**: Counts amounts below one million in *wakirs* (1 wakir = 5 FCFA), as is common in Burkina Faso. Millions and billions stay absolute FCFA values, and leftover francs are read as "tãmb a ...".
|
|
39
|
+
- **Support for Large Numbers**: Handles units, tens, hundreds, thousands, millions, and billions (up to 999 999 999 999).
|
|
40
|
+
- **Negative Numbers**: Prefixed with "- " in both directions.
|
|
41
|
+
- **Strict Parsing**: Unknown words raise a `ValueError` instead of being silently ignored.
|
|
40
42
|
|
|
41
43
|
## Installation
|
|
42
44
|
|
|
@@ -52,12 +54,20 @@ pip install moore_num
|
|
|
52
54
|
from moore_num import convert_to_text
|
|
53
55
|
|
|
54
56
|
# Standard conversion
|
|
55
|
-
print(convert_to_text(125))
|
|
56
|
-
# Output: "
|
|
57
|
+
print(convert_to_text(125))
|
|
58
|
+
# Output: "koabg la pisi la a nu"
|
|
57
59
|
|
|
58
|
-
#
|
|
60
|
+
# Each digit of a thousands/millions/billions multiplier gets its own scale word
|
|
61
|
+
print(convert_to_text(46000))
|
|
62
|
+
# Output: "tus pis-naase la tus a yoobe" (40 000 + 6 000)
|
|
63
|
+
print(convert_to_text(40006))
|
|
64
|
+
# Output: "tus pis-naase la a yoobe" (40 000 + 6)
|
|
65
|
+
|
|
66
|
+
# Money mode (1 wakir = 5 FCFA)
|
|
59
67
|
print(convert_to_text(500, is_money=True))
|
|
60
|
-
# Output: "
|
|
68
|
+
# Output: "koabga"
|
|
69
|
+
print(convert_to_text(7, is_money=True))
|
|
70
|
+
# Output: "ye la tãmb a yiibu" (1 wakir + 2 francs)
|
|
61
71
|
```
|
|
62
72
|
|
|
63
73
|
### Reverse Conversion (Text to Number)
|
|
@@ -66,12 +76,16 @@ print(convert_to_text(500, is_money=True))
|
|
|
66
76
|
from moore_num import text_to_num
|
|
67
77
|
|
|
68
78
|
# Standard reverse
|
|
69
|
-
print(text_to_num("
|
|
79
|
+
print(text_to_num("piig la a yi"))
|
|
70
80
|
# Output: 12
|
|
71
81
|
|
|
72
82
|
# Money mode reverse
|
|
73
|
-
print(text_to_num("
|
|
83
|
+
print(text_to_num("koabga", is_money=True))
|
|
74
84
|
# Output: 500
|
|
85
|
+
|
|
86
|
+
# Unknown words raise an error
|
|
87
|
+
text_to_num("pisi la a bonjour")
|
|
88
|
+
# ValueError: Unknown Mooré number word: 'bonjour'
|
|
75
89
|
```
|
|
76
90
|
|
|
77
91
|
### Command Line Interface
|
|
@@ -81,12 +95,17 @@ print(text_to_num("Koabga", is_money=True))
|
|
|
81
95
|
num2moore 125
|
|
82
96
|
|
|
83
97
|
# Reverse
|
|
84
|
-
num2moore "
|
|
98
|
+
num2moore "piig la a yi" --reverse
|
|
85
99
|
|
|
86
100
|
# Money mode
|
|
87
101
|
num2moore 500 --money
|
|
88
102
|
```
|
|
89
103
|
|
|
104
|
+
## Breaking changes in 0.2.2 (from 0.1.x)
|
|
105
|
+
|
|
106
|
+
- **Thousands, millions and billions**: each digit of the multiplier now gets its own scale word, so every number has a single, unambiguous text. For example, 46 000 is now `tus pis-naase la tus a yoobe` and 145 500 is `tus koabga la tus pis-naase la tus a nu la kobs-nu`. Text written in the old form (`tus koabg la pis-naase la a nu`) is now read differently.
|
|
107
|
+
- **`text_to_num`** raises `ValueError` on unknown words or empty input, instead of returning 0.
|
|
108
|
+
|
|
90
109
|
## License
|
|
91
110
|
|
|
92
111
|
MIT
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# moore_num
|
|
2
|
+
|
|
3
|
+
A Python library for converting numbers to Mooré (Mossi) language text and vice versa.
|
|
4
|
+
|
|
5
|
+
🚀 **Try the interactive demo:** [num2text-playground.vercel.app](https://num2text-playground.vercel.app/)
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Number to Mooré Text**: Convert integers to their textual representation in Mooré.
|
|
10
|
+
- **Mooré Text to Number**: Parse Mooré number phrases back into integers.
|
|
11
|
+
- **Money Mode**: Counts amounts below one million in *wakirs* (1 wakir = 5 FCFA), as is common in Burkina Faso. Millions and billions stay absolute FCFA values, and leftover francs are read as "tãmb a ...".
|
|
12
|
+
- **Support for Large Numbers**: Handles units, tens, hundreds, thousands, millions, and billions (up to 999 999 999 999).
|
|
13
|
+
- **Negative Numbers**: Prefixed with "- " in both directions.
|
|
14
|
+
- **Strict Parsing**: Unknown words raise a `ValueError` instead of being silently ignored.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install moore_num
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
### Forward Conversion (Number to Text)
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from moore_num import convert_to_text
|
|
28
|
+
|
|
29
|
+
# Standard conversion
|
|
30
|
+
print(convert_to_text(125))
|
|
31
|
+
# Output: "koabg la pisi la a nu"
|
|
32
|
+
|
|
33
|
+
# Each digit of a thousands/millions/billions multiplier gets its own scale word
|
|
34
|
+
print(convert_to_text(46000))
|
|
35
|
+
# Output: "tus pis-naase la tus a yoobe" (40 000 + 6 000)
|
|
36
|
+
print(convert_to_text(40006))
|
|
37
|
+
# Output: "tus pis-naase la a yoobe" (40 000 + 6)
|
|
38
|
+
|
|
39
|
+
# Money mode (1 wakir = 5 FCFA)
|
|
40
|
+
print(convert_to_text(500, is_money=True))
|
|
41
|
+
# Output: "koabga"
|
|
42
|
+
print(convert_to_text(7, is_money=True))
|
|
43
|
+
# Output: "ye la tãmb a yiibu" (1 wakir + 2 francs)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Reverse Conversion (Text to Number)
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from moore_num import text_to_num
|
|
50
|
+
|
|
51
|
+
# Standard reverse
|
|
52
|
+
print(text_to_num("piig la a yi"))
|
|
53
|
+
# Output: 12
|
|
54
|
+
|
|
55
|
+
# Money mode reverse
|
|
56
|
+
print(text_to_num("koabga", is_money=True))
|
|
57
|
+
# Output: 500
|
|
58
|
+
|
|
59
|
+
# Unknown words raise an error
|
|
60
|
+
text_to_num("pisi la a bonjour")
|
|
61
|
+
# ValueError: Unknown Mooré number word: 'bonjour'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Command Line Interface
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Forward
|
|
68
|
+
num2moore 125
|
|
69
|
+
|
|
70
|
+
# Reverse
|
|
71
|
+
num2moore "piig la a yi" --reverse
|
|
72
|
+
|
|
73
|
+
# Money mode
|
|
74
|
+
num2moore 500 --money
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Breaking changes in 0.2.2 (from 0.1.x)
|
|
78
|
+
|
|
79
|
+
- **Thousands, millions and billions**: each digit of the multiplier now gets its own scale word, so every number has a single, unambiguous text. For example, 46 000 is now `tus pis-naase la tus a yoobe` and 145 500 is `tus koabga la tus pis-naase la tus a nu la kobs-nu`. Text written in the old form (`tus koabg la pis-naase la a nu`) is now read differently.
|
|
80
|
+
- **`text_to_num`** raises `ValueError` on unknown words or empty input, instead of returning 0.
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
|
85
|
+
|
|
86
|
+
## Citation
|
|
87
|
+
|
|
88
|
+
If you use this software in your research, please cite it using the following BibTeX format:
|
|
89
|
+
|
|
90
|
+
```bibtex
|
|
91
|
+
@software{moore_num,
|
|
92
|
+
author = {Ouily, Hamed Joseph},
|
|
93
|
+
title = {moore\_num: A Python library for converting numbers to Mooré text},
|
|
94
|
+
url = {https://github.com/ohamjoseph/moore_num},
|
|
95
|
+
year = {2026}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moore_num
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A library to convert numbers to Mooré text and vice versa
|
|
5
5
|
Home-page: https://github.com/ohamjoseph/moore_num.git
|
|
6
6
|
Author: Hamed Joseph OUILY
|
|
@@ -35,8 +35,10 @@ A Python library for converting numbers to Mooré (Mossi) language text and vice
|
|
|
35
35
|
|
|
36
36
|
- **Number to Mooré Text**: Convert integers to their textual representation in Mooré.
|
|
37
37
|
- **Mooré Text to Number**: Parse Mooré number phrases back into integers.
|
|
38
|
-
- **Money Mode**:
|
|
39
|
-
- **Support for Large Numbers**: Handles units, tens, hundreds, thousands, millions, and billions.
|
|
38
|
+
- **Money Mode**: Counts amounts below one million in *wakirs* (1 wakir = 5 FCFA), as is common in Burkina Faso. Millions and billions stay absolute FCFA values, and leftover francs are read as "tãmb a ...".
|
|
39
|
+
- **Support for Large Numbers**: Handles units, tens, hundreds, thousands, millions, and billions (up to 999 999 999 999).
|
|
40
|
+
- **Negative Numbers**: Prefixed with "- " in both directions.
|
|
41
|
+
- **Strict Parsing**: Unknown words raise a `ValueError` instead of being silently ignored.
|
|
40
42
|
|
|
41
43
|
## Installation
|
|
42
44
|
|
|
@@ -52,12 +54,20 @@ pip install moore_num
|
|
|
52
54
|
from moore_num import convert_to_text
|
|
53
55
|
|
|
54
56
|
# Standard conversion
|
|
55
|
-
print(convert_to_text(125))
|
|
56
|
-
# Output: "
|
|
57
|
+
print(convert_to_text(125))
|
|
58
|
+
# Output: "koabg la pisi la a nu"
|
|
57
59
|
|
|
58
|
-
#
|
|
60
|
+
# Each digit of a thousands/millions/billions multiplier gets its own scale word
|
|
61
|
+
print(convert_to_text(46000))
|
|
62
|
+
# Output: "tus pis-naase la tus a yoobe" (40 000 + 6 000)
|
|
63
|
+
print(convert_to_text(40006))
|
|
64
|
+
# Output: "tus pis-naase la a yoobe" (40 000 + 6)
|
|
65
|
+
|
|
66
|
+
# Money mode (1 wakir = 5 FCFA)
|
|
59
67
|
print(convert_to_text(500, is_money=True))
|
|
60
|
-
# Output: "
|
|
68
|
+
# Output: "koabga"
|
|
69
|
+
print(convert_to_text(7, is_money=True))
|
|
70
|
+
# Output: "ye la tãmb a yiibu" (1 wakir + 2 francs)
|
|
61
71
|
```
|
|
62
72
|
|
|
63
73
|
### Reverse Conversion (Text to Number)
|
|
@@ -66,12 +76,16 @@ print(convert_to_text(500, is_money=True))
|
|
|
66
76
|
from moore_num import text_to_num
|
|
67
77
|
|
|
68
78
|
# Standard reverse
|
|
69
|
-
print(text_to_num("
|
|
79
|
+
print(text_to_num("piig la a yi"))
|
|
70
80
|
# Output: 12
|
|
71
81
|
|
|
72
82
|
# Money mode reverse
|
|
73
|
-
print(text_to_num("
|
|
83
|
+
print(text_to_num("koabga", is_money=True))
|
|
74
84
|
# Output: 500
|
|
85
|
+
|
|
86
|
+
# Unknown words raise an error
|
|
87
|
+
text_to_num("pisi la a bonjour")
|
|
88
|
+
# ValueError: Unknown Mooré number word: 'bonjour'
|
|
75
89
|
```
|
|
76
90
|
|
|
77
91
|
### Command Line Interface
|
|
@@ -81,12 +95,17 @@ print(text_to_num("Koabga", is_money=True))
|
|
|
81
95
|
num2moore 125
|
|
82
96
|
|
|
83
97
|
# Reverse
|
|
84
|
-
num2moore "
|
|
98
|
+
num2moore "piig la a yi" --reverse
|
|
85
99
|
|
|
86
100
|
# Money mode
|
|
87
101
|
num2moore 500 --money
|
|
88
102
|
```
|
|
89
103
|
|
|
104
|
+
## Breaking changes in 0.2.2 (from 0.1.x)
|
|
105
|
+
|
|
106
|
+
- **Thousands, millions and billions**: each digit of the multiplier now gets its own scale word, so every number has a single, unambiguous text. For example, 46 000 is now `tus pis-naase la tus a yoobe` and 145 500 is `tus koabga la tus pis-naase la tus a nu la kobs-nu`. Text written in the old form (`tus koabg la pis-naase la a nu`) is now read differently.
|
|
107
|
+
- **`text_to_num`** raises `ValueError` on unknown words or empty input, instead of returning 0.
|
|
108
|
+
|
|
90
109
|
## License
|
|
91
110
|
|
|
92
111
|
MIT
|
moore_num-0.2.0/README.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# moore_num
|
|
2
|
-
|
|
3
|
-
A Python library for converting numbers to Mooré (Mossi) language text and vice versa.
|
|
4
|
-
|
|
5
|
-
🚀 **Try the interactive demo:** [num2text-playground.vercel.app](https://num2text-playground.vercel.app/)
|
|
6
|
-
|
|
7
|
-
## Features
|
|
8
|
-
|
|
9
|
-
- **Number to Mooré Text**: Convert integers to their textual representation in Mooré.
|
|
10
|
-
- **Mooré Text to Number**: Parse Mooré number phrases back into integers.
|
|
11
|
-
- **Money Mode**: Special scaling factor (x5) for currency calculations common in Burkina Faso.
|
|
12
|
-
- **Support for Large Numbers**: Handles units, tens, hundreds, thousands, millions, and billions.
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
pip install moore_num
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
### Forward Conversion (Number to Text)
|
|
23
|
-
|
|
24
|
-
```python
|
|
25
|
-
from moore_num import convert_to_text
|
|
26
|
-
|
|
27
|
-
# Standard conversion
|
|
28
|
-
print(convert_to_text(125))
|
|
29
|
-
# Output: "Koabga la pisi la a nu"
|
|
30
|
-
|
|
31
|
-
# Money mode (5 CFA = 1 unit in common counting)
|
|
32
|
-
print(convert_to_text(500, is_money=True))
|
|
33
|
-
# Output: "Koabga"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Reverse Conversion (Text to Number)
|
|
37
|
-
|
|
38
|
-
```python
|
|
39
|
-
from moore_num import text_to_num
|
|
40
|
-
|
|
41
|
-
# Standard reverse
|
|
42
|
-
print(text_to_num("Piig la a yii"))
|
|
43
|
-
# Output: 12
|
|
44
|
-
|
|
45
|
-
# Money mode reverse
|
|
46
|
-
print(text_to_num("Koabga", is_money=True))
|
|
47
|
-
# Output: 500
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Command Line Interface
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
# Forward
|
|
54
|
-
num2moore 125
|
|
55
|
-
|
|
56
|
-
# Reverse
|
|
57
|
-
num2moore "Piig la a yii" --reverse
|
|
58
|
-
|
|
59
|
-
# Money mode
|
|
60
|
-
num2moore 500 --money
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## License
|
|
64
|
-
|
|
65
|
-
MIT
|
|
66
|
-
|
|
67
|
-
## Citation
|
|
68
|
-
|
|
69
|
-
If you use this software in your research, please cite it using the following BibTeX format:
|
|
70
|
-
|
|
71
|
-
```bibtex
|
|
72
|
-
@software{moore_num,
|
|
73
|
-
author = {Ouily, Hamed Joseph},
|
|
74
|
-
title = {moore\_num: A Python library for converting numbers to Mooré text},
|
|
75
|
-
url = {https://github.com/ohamjoseph/moore_num},
|
|
76
|
-
year = {2026}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|