words2num2 0.3.1__tar.gz → 0.3.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.
- {words2num2-0.3.1 → words2num2-0.3.2}/PKG-INFO +33 -28
- {words2num2-0.3.1 → words2num2-0.3.2}/README.rst +28 -23
- {words2num2-0.3.1 → words2num2-0.3.2}/pyproject.toml +5 -5
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/Cargo.lock +3 -3
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/Cargo.toml +2 -2
- words2num2-0.3.2/rust/words2num2-core/src/lib.rs +620 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/words2num2-core/src/w2n_sentence.rs +125 -2
- words2num2-0.3.1/rust/words2num2-core/src/lib.rs +0 -242
- {words2num2-0.3.1 → words2num2-0.3.2}/COPYING +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/words2num2-core/Cargo.toml +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/words2num2-core/src/w2n_formats.rs +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/words2num2-core/src/w2n_lang_en.rs +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/words2num2-py/Cargo.toml +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/rust/words2num2-py/src/lib.rs +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/words2num2/__init__.py +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/words2num2/__main__.py +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/words2num2/_version.py +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/words2num2/base.py +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/words2num2/converters/__init__.py +0 -0
- {words2num2-0.3.1 → words2num2-0.3.2}/words2num2/converters/auto.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: words2num2
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -22,10 +22,10 @@ Maintainer-email: Jean-Louis Queguiner <jean-louis.queguiner@gmail.com>
|
|
|
22
22
|
License-Expression: LGPL-2.1-only
|
|
23
23
|
Requires-Python: >=3.10
|
|
24
24
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
25
|
-
Project-URL: Bug Tracker, https://github.com/
|
|
26
|
-
Project-URL: Documentation, https://github.com/
|
|
27
|
-
Project-URL: Homepage, https://github.com/
|
|
28
|
-
Project-URL: Repository, https://github.com/
|
|
25
|
+
Project-URL: Bug Tracker, https://github.com/gladiaio/words2num2/issues
|
|
26
|
+
Project-URL: Documentation, https://github.com/gladiaio/words2num2/wiki
|
|
27
|
+
Project-URL: Homepage, https://github.com/gladiaio/words2num2
|
|
28
|
+
Project-URL: Repository, https://github.com/gladiaio/words2num2.git
|
|
29
29
|
|
|
30
30
|
words2num2 — words to numbers
|
|
31
31
|
=============================
|
|
@@ -50,43 +50,43 @@ words2num2 — words to numbers
|
|
|
50
50
|
:target: https://aur.archlinux.org/packages/python-words2num2
|
|
51
51
|
:alt: AUR version
|
|
52
52
|
|
|
53
|
-
.. image:: https://github.com/
|
|
54
|
-
:target: https://github.com/
|
|
53
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/CI/badge.svg
|
|
54
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/ci.yml
|
|
55
55
|
:alt: CI
|
|
56
56
|
|
|
57
|
-
.. image:: https://github.com/
|
|
58
|
-
:target: https://github.com/
|
|
57
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/Lint/badge.svg
|
|
58
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/lint.yml
|
|
59
59
|
:alt: Lint
|
|
60
60
|
|
|
61
|
-
.. image:: https://github.com/
|
|
62
|
-
:target: https://github.com/
|
|
61
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/CodeQL/badge.svg
|
|
62
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/codeql-analysis.yml
|
|
63
63
|
:alt: CodeQL
|
|
64
64
|
|
|
65
|
-
.. image:: https://github.com/
|
|
66
|
-
:target: https://github.com/
|
|
65
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/E2E%20Tests/badge.svg
|
|
66
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/e2e-tests.yml
|
|
67
67
|
:alt: E2E Tests
|
|
68
68
|
|
|
69
|
-
.. image:: https://coveralls.io/repos/github/
|
|
70
|
-
:target: https://coveralls.io/github/
|
|
69
|
+
.. image:: https://coveralls.io/repos/github/gladiaio/words2num2/badge.svg?branch=main
|
|
70
|
+
:target: https://coveralls.io/github/gladiaio/words2num2?branch=main
|
|
71
71
|
:alt: Coverage
|
|
72
72
|
|
|
73
|
-
.. image:: https://img.shields.io/github/v/release/
|
|
74
|
-
:target: https://github.com/
|
|
73
|
+
.. image:: https://img.shields.io/github/v/release/gladiaio/words2num2.svg
|
|
74
|
+
:target: https://github.com/gladiaio/words2num2/releases
|
|
75
75
|
:alt: Latest release
|
|
76
76
|
|
|
77
|
-
.. image:: https://img.shields.io/github/last-commit/
|
|
78
|
-
:target: https://github.com/
|
|
77
|
+
.. image:: https://img.shields.io/github/last-commit/gladiaio/words2num2.svg
|
|
78
|
+
:target: https://github.com/gladiaio/words2num2/commits/main
|
|
79
79
|
:alt: Last commit
|
|
80
80
|
|
|
81
|
-
.. image:: https://img.shields.io/github/issues/
|
|
82
|
-
:target: https://github.com/
|
|
81
|
+
.. image:: https://img.shields.io/github/issues/gladiaio/words2num2.svg
|
|
82
|
+
:target: https://github.com/gladiaio/words2num2/issues
|
|
83
83
|
:alt: Issues
|
|
84
84
|
|
|
85
85
|
.. image:: https://img.shields.io/badge/license-LGPL--2.1-blue.svg
|
|
86
|
-
:target: https://github.com/
|
|
86
|
+
:target: https://github.com/gladiaio/words2num2/blob/main/COPYING
|
|
87
87
|
:alt: License
|
|
88
88
|
|
|
89
|
-
The inverse of `num2words2 <https://github.com/
|
|
89
|
+
The inverse of `num2words2 <https://github.com/gladiaio/num2words2>`_.
|
|
90
90
|
|
|
91
91
|
``words2num2`` parses spoken-form numbers — ``"forty-two"``,
|
|
92
92
|
``"trois cent quatre"``, ``"二十三"`` — and returns numeric values.
|
|
@@ -107,9 +107,9 @@ frozen corpus of ~11,000 round-trip cases.
|
|
|
107
107
|
The project is hosted on GitHub_, and the full documentation is available
|
|
108
108
|
in the Wiki_. Contributions are welcome.
|
|
109
109
|
|
|
110
|
-
.. _GitHub: https://github.com/
|
|
111
|
-
.. _Wiki: https://github.com/
|
|
112
|
-
.. _GitHub Releases: https://github.com/
|
|
110
|
+
.. _GitHub: https://github.com/gladiaio/words2num2
|
|
111
|
+
.. _Wiki: https://github.com/gladiaio/words2num2/wiki
|
|
112
|
+
.. _GitHub Releases: https://github.com/gladiaio/words2num2/releases
|
|
113
113
|
|
|
114
114
|
Why this library
|
|
115
115
|
----------------
|
|
@@ -172,6 +172,11 @@ Installation
|
|
|
172
172
|
|
|
173
173
|
pip install words2num2
|
|
174
174
|
|
|
175
|
+
**cargo** (Rust) — the compiled core is published on crates.io as
|
|
176
|
+
`words2num2-core <https://crates.io/crates/words2num2-core>`_::
|
|
177
|
+
|
|
178
|
+
cargo add words2num2-core
|
|
179
|
+
|
|
175
180
|
That's it — the wheel bundles the Python binder and the compiled Rust
|
|
176
181
|
extension, and ``words2num2`` has **no runtime dependencies** (the num2words2
|
|
177
182
|
conversion engine is compiled in, so you do *not* need the num2words2 package).
|
|
@@ -202,7 +207,7 @@ needs a **stable Rust toolchain** (`rustup <https://rustup.rs>`_); nothing else.
|
|
|
202
207
|
**From source** (needs a stable Rust toolchain and `maturin
|
|
203
208
|
<https://www.maturin.rs>`_)::
|
|
204
209
|
|
|
205
|
-
git clone https://github.com/
|
|
210
|
+
git clone https://github.com/gladiaio/words2num2
|
|
206
211
|
cd words2num2
|
|
207
212
|
pip install -e . # builds the Rust extension via maturin
|
|
208
213
|
# or, to produce a wheel: maturin build --release
|
|
@@ -409,7 +414,7 @@ Development
|
|
|
409
414
|
|
|
410
415
|
.. code-block:: bash
|
|
411
416
|
|
|
412
|
-
git clone https://github.com/
|
|
417
|
+
git clone https://github.com/gladiaio/words2num2
|
|
413
418
|
cd words2num2
|
|
414
419
|
make install-dev
|
|
415
420
|
make test # pytest
|
|
@@ -21,43 +21,43 @@ words2num2 — words to numbers
|
|
|
21
21
|
:target: https://aur.archlinux.org/packages/python-words2num2
|
|
22
22
|
:alt: AUR version
|
|
23
23
|
|
|
24
|
-
.. image:: https://github.com/
|
|
25
|
-
:target: https://github.com/
|
|
24
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/CI/badge.svg
|
|
25
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/ci.yml
|
|
26
26
|
:alt: CI
|
|
27
27
|
|
|
28
|
-
.. image:: https://github.com/
|
|
29
|
-
:target: https://github.com/
|
|
28
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/Lint/badge.svg
|
|
29
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/lint.yml
|
|
30
30
|
:alt: Lint
|
|
31
31
|
|
|
32
|
-
.. image:: https://github.com/
|
|
33
|
-
:target: https://github.com/
|
|
32
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/CodeQL/badge.svg
|
|
33
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/codeql-analysis.yml
|
|
34
34
|
:alt: CodeQL
|
|
35
35
|
|
|
36
|
-
.. image:: https://github.com/
|
|
37
|
-
:target: https://github.com/
|
|
36
|
+
.. image:: https://github.com/gladiaio/words2num2/workflows/E2E%20Tests/badge.svg
|
|
37
|
+
:target: https://github.com/gladiaio/words2num2/actions/workflows/e2e-tests.yml
|
|
38
38
|
:alt: E2E Tests
|
|
39
39
|
|
|
40
|
-
.. image:: https://coveralls.io/repos/github/
|
|
41
|
-
:target: https://coveralls.io/github/
|
|
40
|
+
.. image:: https://coveralls.io/repos/github/gladiaio/words2num2/badge.svg?branch=main
|
|
41
|
+
:target: https://coveralls.io/github/gladiaio/words2num2?branch=main
|
|
42
42
|
:alt: Coverage
|
|
43
43
|
|
|
44
|
-
.. image:: https://img.shields.io/github/v/release/
|
|
45
|
-
:target: https://github.com/
|
|
44
|
+
.. image:: https://img.shields.io/github/v/release/gladiaio/words2num2.svg
|
|
45
|
+
:target: https://github.com/gladiaio/words2num2/releases
|
|
46
46
|
:alt: Latest release
|
|
47
47
|
|
|
48
|
-
.. image:: https://img.shields.io/github/last-commit/
|
|
49
|
-
:target: https://github.com/
|
|
48
|
+
.. image:: https://img.shields.io/github/last-commit/gladiaio/words2num2.svg
|
|
49
|
+
:target: https://github.com/gladiaio/words2num2/commits/main
|
|
50
50
|
:alt: Last commit
|
|
51
51
|
|
|
52
|
-
.. image:: https://img.shields.io/github/issues/
|
|
53
|
-
:target: https://github.com/
|
|
52
|
+
.. image:: https://img.shields.io/github/issues/gladiaio/words2num2.svg
|
|
53
|
+
:target: https://github.com/gladiaio/words2num2/issues
|
|
54
54
|
:alt: Issues
|
|
55
55
|
|
|
56
56
|
.. image:: https://img.shields.io/badge/license-LGPL--2.1-blue.svg
|
|
57
|
-
:target: https://github.com/
|
|
57
|
+
:target: https://github.com/gladiaio/words2num2/blob/main/COPYING
|
|
58
58
|
:alt: License
|
|
59
59
|
|
|
60
|
-
The inverse of `num2words2 <https://github.com/
|
|
60
|
+
The inverse of `num2words2 <https://github.com/gladiaio/num2words2>`_.
|
|
61
61
|
|
|
62
62
|
``words2num2`` parses spoken-form numbers — ``"forty-two"``,
|
|
63
63
|
``"trois cent quatre"``, ``"二十三"`` — and returns numeric values.
|
|
@@ -78,9 +78,9 @@ frozen corpus of ~11,000 round-trip cases.
|
|
|
78
78
|
The project is hosted on GitHub_, and the full documentation is available
|
|
79
79
|
in the Wiki_. Contributions are welcome.
|
|
80
80
|
|
|
81
|
-
.. _GitHub: https://github.com/
|
|
82
|
-
.. _Wiki: https://github.com/
|
|
83
|
-
.. _GitHub Releases: https://github.com/
|
|
81
|
+
.. _GitHub: https://github.com/gladiaio/words2num2
|
|
82
|
+
.. _Wiki: https://github.com/gladiaio/words2num2/wiki
|
|
83
|
+
.. _GitHub Releases: https://github.com/gladiaio/words2num2/releases
|
|
84
84
|
|
|
85
85
|
Why this library
|
|
86
86
|
----------------
|
|
@@ -143,6 +143,11 @@ Installation
|
|
|
143
143
|
|
|
144
144
|
pip install words2num2
|
|
145
145
|
|
|
146
|
+
**cargo** (Rust) — the compiled core is published on crates.io as
|
|
147
|
+
`words2num2-core <https://crates.io/crates/words2num2-core>`_::
|
|
148
|
+
|
|
149
|
+
cargo add words2num2-core
|
|
150
|
+
|
|
146
151
|
That's it — the wheel bundles the Python binder and the compiled Rust
|
|
147
152
|
extension, and ``words2num2`` has **no runtime dependencies** (the num2words2
|
|
148
153
|
conversion engine is compiled in, so you do *not* need the num2words2 package).
|
|
@@ -173,7 +178,7 @@ needs a **stable Rust toolchain** (`rustup <https://rustup.rs>`_); nothing else.
|
|
|
173
178
|
**From source** (needs a stable Rust toolchain and `maturin
|
|
174
179
|
<https://www.maturin.rs>`_)::
|
|
175
180
|
|
|
176
|
-
git clone https://github.com/
|
|
181
|
+
git clone https://github.com/gladiaio/words2num2
|
|
177
182
|
cd words2num2
|
|
178
183
|
pip install -e . # builds the Rust extension via maturin
|
|
179
184
|
# or, to produce a wheel: maturin build --release
|
|
@@ -380,7 +385,7 @@ Development
|
|
|
380
385
|
|
|
381
386
|
.. code-block:: bash
|
|
382
387
|
|
|
383
|
-
git clone https://github.com/
|
|
388
|
+
git clone https://github.com/gladiaio/words2num2
|
|
384
389
|
cd words2num2
|
|
385
390
|
make install-dev
|
|
386
391
|
make test # pytest
|
|
@@ -6,7 +6,7 @@ build-backend = "maturin"
|
|
|
6
6
|
name = "words2num2"
|
|
7
7
|
# Static base version. The release CI overrides it from the pushed git tag
|
|
8
8
|
# (see .github/workflows/release.yml); bump here for local source builds.
|
|
9
|
-
version = "0.3.
|
|
9
|
+
version = "0.3.2"
|
|
10
10
|
license = "LGPL-2.1-only"
|
|
11
11
|
license-files = ["COPYING"]
|
|
12
12
|
description = "Rust-powered inverse of num2words2: parse spoken-form numbers back to numeric values across 100+ languages, optimized for ASR/LLM/speech."
|
|
@@ -43,10 +43,10 @@ classifiers = [
|
|
|
43
43
|
]
|
|
44
44
|
|
|
45
45
|
[project.urls]
|
|
46
|
-
Homepage = "https://github.com/
|
|
47
|
-
Documentation = "https://github.com/
|
|
48
|
-
Repository = "https://github.com/
|
|
49
|
-
"Bug Tracker" = "https://github.com/
|
|
46
|
+
Homepage = "https://github.com/gladiaio/words2num2"
|
|
47
|
+
Documentation = "https://github.com/gladiaio/words2num2/wiki"
|
|
48
|
+
Repository = "https://github.com/gladiaio/words2num2.git"
|
|
49
|
+
"Bug Tracker" = "https://github.com/gladiaio/words2num2/issues"
|
|
50
50
|
|
|
51
51
|
[project.scripts]
|
|
52
52
|
words2num2 = "words2num2.__main__:main"
|
|
@@ -105,7 +105,7 @@ dependencies = [
|
|
|
105
105
|
|
|
106
106
|
[[package]]
|
|
107
107
|
name = "num2words2-core"
|
|
108
|
-
version = "0.1.
|
|
108
|
+
version = "0.1.2"
|
|
109
109
|
dependencies = [
|
|
110
110
|
"bigdecimal",
|
|
111
111
|
"num-bigint",
|
|
@@ -268,7 +268,7 @@ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
|
268
268
|
|
|
269
269
|
[[package]]
|
|
270
270
|
name = "words2num2-core"
|
|
271
|
-
version = "0.1.
|
|
271
|
+
version = "0.1.2"
|
|
272
272
|
dependencies = [
|
|
273
273
|
"bigdecimal",
|
|
274
274
|
"num-bigint",
|
|
@@ -278,7 +278,7 @@ dependencies = [
|
|
|
278
278
|
|
|
279
279
|
[[package]]
|
|
280
280
|
name = "words2num2-py"
|
|
281
|
-
version = "0.1.
|
|
281
|
+
version = "0.1.2"
|
|
282
282
|
dependencies = [
|
|
283
283
|
"bigdecimal",
|
|
284
284
|
"num-bigint",
|
|
@@ -3,10 +3,10 @@ members = ["words2num2-core", "words2num2-py"]
|
|
|
3
3
|
resolver = "2"
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.1.
|
|
6
|
+
version = "0.1.2"
|
|
7
7
|
edition = "2021"
|
|
8
8
|
license = "LGPL-2.1-only"
|
|
9
|
-
repository = "https://github.com/
|
|
9
|
+
repository = "https://github.com/gladiaio/words2num2"
|
|
10
10
|
|
|
11
11
|
[profile.release]
|
|
12
12
|
opt-level = 3
|