scriptconv-nonfree 0.2.1a1__tar.gz → 0.2.2a1__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.
- scriptconv_nonfree-0.2.2a1/PKG-INFO +116 -0
- scriptconv_nonfree-0.2.2a1/README.md +62 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/phonetise_buckwalter.py +8 -1
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/version.py +1 -1
- scriptconv_nonfree-0.2.2a1/scriptconv_nonfree.egg-info/PKG-INFO +116 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_halabi_iqra.py +20 -0
- scriptconv_nonfree-0.2.1a1/PKG-INFO +0 -122
- scriptconv_nonfree-0.2.1a1/README.md +0 -68
- scriptconv_nonfree-0.2.1a1/scriptconv_nonfree.egg-info/PKG-INFO +0 -122
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/LICENSE +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/LICENSE.africa-g2p-data.md +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/pyproject.toml +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.cc-by-nc-4.0 +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.md +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/phonetiser.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.cc-by-nc-4.0 +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.mantoq +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.md +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/symbols.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/tokenization.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/num2words.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/unicode_symbol2label.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/africa.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ar.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ghana.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/vi.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/SOURCES.txt +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/dependency_links.txt +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/requires.txt +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/top_level.txt +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/setup.cfg +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_match_lang_direction.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_africa.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_cjk_ar.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_friendly_import_errors.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_ghana.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_identity.py +0 -0
- {scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_mantoq_long_digits.py +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scriptconv-nonfree
|
|
3
|
+
Version: 0.2.2a1
|
|
4
|
+
Summary: scriptconv phonemizer backends whose code, data or dependencies are non-commercial or carry no licence grant
|
|
5
|
+
Author-email: TigreGotico <contact@tigregotico.com>
|
|
6
|
+
License-Expression: Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data
|
|
7
|
+
Project-URL: Homepage, https://github.com/TigreGotico/scriptconv-nonfree
|
|
8
|
+
Project-URL: Repository, https://github.com/TigreGotico/scriptconv-nonfree
|
|
9
|
+
Project-URL: Issues, https://github.com/TigreGotico/scriptconv-nonfree/issues
|
|
10
|
+
Keywords: g2p,phonemizer,tts,scriptconv,arabic,mantoq,halabi,iqra,vietnamese,african-languages
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.md
|
|
23
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.mantoq
|
|
24
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.cc-by-nc-4.0
|
|
25
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.md
|
|
26
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.cc-by-nc-4.0
|
|
27
|
+
License-File: LICENSE.africa-g2p-data.md
|
|
28
|
+
Requires-Dist: scriptconv[phonemizers]>=0.0.4a98
|
|
29
|
+
Provides-Extra: ar-phonemizers
|
|
30
|
+
Requires-Dist: ovos-number-parser; extra == "ar-phonemizers"
|
|
31
|
+
Provides-Extra: vi
|
|
32
|
+
Requires-Dist: viphoneme; python_version < "3.12" and extra == "vi"
|
|
33
|
+
Requires-Dist: vinorm; python_version < "3.12" and extra == "vi"
|
|
34
|
+
Requires-Dist: underthesea; python_version < "3.12" and extra == "vi"
|
|
35
|
+
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "vi"
|
|
36
|
+
Provides-Extra: africa
|
|
37
|
+
Requires-Dist: africa-g2p>=0.3.5; extra == "africa"
|
|
38
|
+
Provides-Extra: ghana
|
|
39
|
+
Requires-Dist: ghana-g2p>=0.1.1; extra == "ghana"
|
|
40
|
+
Requires-Dist: africa-g2p>=0.3.5; extra == "ghana"
|
|
41
|
+
Provides-Extra: test
|
|
42
|
+
Requires-Dist: pytest; extra == "test"
|
|
43
|
+
Requires-Dist: pytest-timeout; extra == "test"
|
|
44
|
+
Requires-Dist: ovos-number-parser; extra == "test"
|
|
45
|
+
Requires-Dist: africa-g2p>=0.3.5; extra == "test"
|
|
46
|
+
Requires-Dist: ghana-g2p>=0.1.1; extra == "test"
|
|
47
|
+
Requires-Dist: viphoneme; python_version < "3.12" and extra == "test"
|
|
48
|
+
Requires-Dist: vinorm; python_version < "3.12" and extra == "test"
|
|
49
|
+
Requires-Dist: underthesea; python_version < "3.12" and extra == "test"
|
|
50
|
+
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "test"
|
|
51
|
+
Requires-Dist: linguatag[langcodes]>=0.2.3a1; extra == "test"
|
|
52
|
+
Requires-Dist: packaging; extra == "test"
|
|
53
|
+
Dynamic: license-file
|
|
54
|
+
|
|
55
|
+
# scriptconv-nonfree
|
|
56
|
+
|
|
57
|
+
<!-- agent-hint
|
|
58
|
+
covers: what scriptconv-nonfree is, the quickstart, the backends it holds and its licence
|
|
59
|
+
source: pyproject.toml, scriptconv_nonfree/phonemizers/, LICENSE.africa-g2p-data.md, scriptconv/phonemizers/registry.py in scriptconv
|
|
60
|
+
generated: no
|
|
61
|
+
verify: python -m doctest README.md
|
|
62
|
+
see: docs/index.md, docs/getting-started.md, AGENTS.md
|
|
63
|
+
-->
|
|
64
|
+
|
|
65
|
+
scriptconv-nonfree holds the phonemizer backends of
|
|
66
|
+
[scriptconv](https://github.com/TigreGotico/scriptconv) whose code, data or
|
|
67
|
+
dependencies are for non-commercial use only, or carry no licence grant.
|
|
68
|
+
scriptconv keeps the registry, and its extras install this package, so you
|
|
69
|
+
call the backends through scriptconv as usual. Do not use them in a commercial
|
|
70
|
+
product.
|
|
71
|
+
|
|
72
|
+
## Quickstart
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
uv pip install --prerelease=allow "scriptconv[ar-phonemizers]"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
>>> from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
80
|
+
>>> get_phonemizer(Phonemizer.MANTOQ).phonemize_string("مَرْحَبًا بِالْعَالَمِ", "ar")
|
|
81
|
+
'marħabanaː bilʕaːlami'
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
mantoq reads the diacritics of the text and adds none.
|
|
86
|
+
[Getting started](docs/getting-started.md) walks through the alphabets, the
|
|
87
|
+
African backends and the draft rule tables.
|
|
88
|
+
|
|
89
|
+
## Backends
|
|
90
|
+
|
|
91
|
+
| `Phonemizer` values | scriptconv extra | Restricted item |
|
|
92
|
+
| --- | --- | --- |
|
|
93
|
+
| `mantoq`, `halabi`, `iqra` | `ar-phonemizers` | the Arabic-Phonetiser of Nawar Halabi, CC-BY-NC-4.0 |
|
|
94
|
+
| `viphoneme` | `vi` | viphoneme and vinorm, "Free for non-commercial use" |
|
|
95
|
+
| `africa_g2p` | `africa` | the africa-g2p rule tables, with no licence grant |
|
|
96
|
+
| `ghana_g2p` | `ghana` | the same rule tables, which ghana-g2p loads |
|
|
97
|
+
|
|
98
|
+
scriptconv never picks one of these backends by default: the Arabic default
|
|
99
|
+
is arbtok. The [backend reference](docs/backends.md) gives the languages,
|
|
100
|
+
alphabets and parameters of each backend.
|
|
101
|
+
|
|
102
|
+
## Licence
|
|
103
|
+
|
|
104
|
+
The package is `Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data`.
|
|
105
|
+
Its own glue code is Apache-2.0. The vendored mantoq code is MIT, except the
|
|
106
|
+
phonetiser and `num2words.py`. The two vendored copies of the Arabic phonetiser are
|
|
107
|
+
CC-BY-NC-4.0, which forbids commercial use. `LICENSE.africa-g2p-data.md`
|
|
108
|
+
states the terms of the africa-g2p rule tables, which the `africa` and `ghana`
|
|
109
|
+
backends load: they are not for commercial use. [Licences](docs/licences.md)
|
|
110
|
+
gives the restricted item of each backend and the licence of each file.
|
|
111
|
+
|
|
112
|
+
## Documentation
|
|
113
|
+
|
|
114
|
+
The [documentation index](docs/index.md) lists every page in reading order.
|
|
115
|
+
The [scriptconv documentation](https://github.com/TigreGotico/scriptconv/tree/dev/docs)
|
|
116
|
+
explains the phonemizer contract and the other backends.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# scriptconv-nonfree
|
|
2
|
+
|
|
3
|
+
<!-- agent-hint
|
|
4
|
+
covers: what scriptconv-nonfree is, the quickstart, the backends it holds and its licence
|
|
5
|
+
source: pyproject.toml, scriptconv_nonfree/phonemizers/, LICENSE.africa-g2p-data.md, scriptconv/phonemizers/registry.py in scriptconv
|
|
6
|
+
generated: no
|
|
7
|
+
verify: python -m doctest README.md
|
|
8
|
+
see: docs/index.md, docs/getting-started.md, AGENTS.md
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
scriptconv-nonfree holds the phonemizer backends of
|
|
12
|
+
[scriptconv](https://github.com/TigreGotico/scriptconv) whose code, data or
|
|
13
|
+
dependencies are for non-commercial use only, or carry no licence grant.
|
|
14
|
+
scriptconv keeps the registry, and its extras install this package, so you
|
|
15
|
+
call the backends through scriptconv as usual. Do not use them in a commercial
|
|
16
|
+
product.
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv pip install --prerelease=allow "scriptconv[ar-phonemizers]"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
>>> from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
26
|
+
>>> get_phonemizer(Phonemizer.MANTOQ).phonemize_string("مَرْحَبًا بِالْعَالَمِ", "ar")
|
|
27
|
+
'marħabanaː bilʕaːlami'
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
mantoq reads the diacritics of the text and adds none.
|
|
32
|
+
[Getting started](docs/getting-started.md) walks through the alphabets, the
|
|
33
|
+
African backends and the draft rule tables.
|
|
34
|
+
|
|
35
|
+
## Backends
|
|
36
|
+
|
|
37
|
+
| `Phonemizer` values | scriptconv extra | Restricted item |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `mantoq`, `halabi`, `iqra` | `ar-phonemizers` | the Arabic-Phonetiser of Nawar Halabi, CC-BY-NC-4.0 |
|
|
40
|
+
| `viphoneme` | `vi` | viphoneme and vinorm, "Free for non-commercial use" |
|
|
41
|
+
| `africa_g2p` | `africa` | the africa-g2p rule tables, with no licence grant |
|
|
42
|
+
| `ghana_g2p` | `ghana` | the same rule tables, which ghana-g2p loads |
|
|
43
|
+
|
|
44
|
+
scriptconv never picks one of these backends by default: the Arabic default
|
|
45
|
+
is arbtok. The [backend reference](docs/backends.md) gives the languages,
|
|
46
|
+
alphabets and parameters of each backend.
|
|
47
|
+
|
|
48
|
+
## Licence
|
|
49
|
+
|
|
50
|
+
The package is `Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data`.
|
|
51
|
+
Its own glue code is Apache-2.0. The vendored mantoq code is MIT, except the
|
|
52
|
+
phonetiser and `num2words.py`. The two vendored copies of the Arabic phonetiser are
|
|
53
|
+
CC-BY-NC-4.0, which forbids commercial use. `LICENSE.africa-g2p-data.md`
|
|
54
|
+
states the terms of the africa-g2p rule tables, which the `africa` and `ghana`
|
|
55
|
+
backends load: they are not for commercial use. [Licences](docs/licences.md)
|
|
56
|
+
gives the restricted item of each backend and the licence of each file.
|
|
57
|
+
|
|
58
|
+
## Documentation
|
|
59
|
+
|
|
60
|
+
The [documentation index](docs/index.md) lists every page in reading order.
|
|
61
|
+
The [scriptconv documentation](https://github.com/TigreGotico/scriptconv/tree/dev/docs)
|
|
62
|
+
explains the phonemizer contract and the other backends.
|
|
@@ -9,7 +9,14 @@ import re
|
|
|
9
9
|
|
|
10
10
|
# Arabic \u2194 Buckwalter script conversion is delegated to scriptconv.notation,
|
|
11
11
|
# which is the org-wide notation-transcoding library.
|
|
12
|
-
from scriptconv.notation import arabic_to_buckwalter
|
|
12
|
+
from scriptconv.notation import arabic_to_buckwalter as standard_arabic_to_buckwalter
|
|
13
|
+
from scriptconv.notation import buckwalter_to_arabic
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def arabic_to_buckwalter(arabic):
|
|
17
|
+
# The phonetiser reads Halabi's Buckwalter, which writes ث as "^" where the
|
|
18
|
+
# standard table writes "v". A "v" already in the text stays as it is.
|
|
19
|
+
return "".join(ch if ch == "v" else standard_arabic_to_buckwalter(ch).replace("v", "^") for ch in arabic)
|
|
13
20
|
|
|
14
21
|
|
|
15
22
|
# ----------------------------------------------------------------------------
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scriptconv-nonfree
|
|
3
|
+
Version: 0.2.2a1
|
|
4
|
+
Summary: scriptconv phonemizer backends whose code, data or dependencies are non-commercial or carry no licence grant
|
|
5
|
+
Author-email: TigreGotico <contact@tigregotico.com>
|
|
6
|
+
License-Expression: Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data
|
|
7
|
+
Project-URL: Homepage, https://github.com/TigreGotico/scriptconv-nonfree
|
|
8
|
+
Project-URL: Repository, https://github.com/TigreGotico/scriptconv-nonfree
|
|
9
|
+
Project-URL: Issues, https://github.com/TigreGotico/scriptconv-nonfree/issues
|
|
10
|
+
Keywords: g2p,phonemizer,tts,scriptconv,arabic,mantoq,halabi,iqra,vietnamese,african-languages
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.md
|
|
23
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.mantoq
|
|
24
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.cc-by-nc-4.0
|
|
25
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.md
|
|
26
|
+
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.cc-by-nc-4.0
|
|
27
|
+
License-File: LICENSE.africa-g2p-data.md
|
|
28
|
+
Requires-Dist: scriptconv[phonemizers]>=0.0.4a98
|
|
29
|
+
Provides-Extra: ar-phonemizers
|
|
30
|
+
Requires-Dist: ovos-number-parser; extra == "ar-phonemizers"
|
|
31
|
+
Provides-Extra: vi
|
|
32
|
+
Requires-Dist: viphoneme; python_version < "3.12" and extra == "vi"
|
|
33
|
+
Requires-Dist: vinorm; python_version < "3.12" and extra == "vi"
|
|
34
|
+
Requires-Dist: underthesea; python_version < "3.12" and extra == "vi"
|
|
35
|
+
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "vi"
|
|
36
|
+
Provides-Extra: africa
|
|
37
|
+
Requires-Dist: africa-g2p>=0.3.5; extra == "africa"
|
|
38
|
+
Provides-Extra: ghana
|
|
39
|
+
Requires-Dist: ghana-g2p>=0.1.1; extra == "ghana"
|
|
40
|
+
Requires-Dist: africa-g2p>=0.3.5; extra == "ghana"
|
|
41
|
+
Provides-Extra: test
|
|
42
|
+
Requires-Dist: pytest; extra == "test"
|
|
43
|
+
Requires-Dist: pytest-timeout; extra == "test"
|
|
44
|
+
Requires-Dist: ovos-number-parser; extra == "test"
|
|
45
|
+
Requires-Dist: africa-g2p>=0.3.5; extra == "test"
|
|
46
|
+
Requires-Dist: ghana-g2p>=0.1.1; extra == "test"
|
|
47
|
+
Requires-Dist: viphoneme; python_version < "3.12" and extra == "test"
|
|
48
|
+
Requires-Dist: vinorm; python_version < "3.12" and extra == "test"
|
|
49
|
+
Requires-Dist: underthesea; python_version < "3.12" and extra == "test"
|
|
50
|
+
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "test"
|
|
51
|
+
Requires-Dist: linguatag[langcodes]>=0.2.3a1; extra == "test"
|
|
52
|
+
Requires-Dist: packaging; extra == "test"
|
|
53
|
+
Dynamic: license-file
|
|
54
|
+
|
|
55
|
+
# scriptconv-nonfree
|
|
56
|
+
|
|
57
|
+
<!-- agent-hint
|
|
58
|
+
covers: what scriptconv-nonfree is, the quickstart, the backends it holds and its licence
|
|
59
|
+
source: pyproject.toml, scriptconv_nonfree/phonemizers/, LICENSE.africa-g2p-data.md, scriptconv/phonemizers/registry.py in scriptconv
|
|
60
|
+
generated: no
|
|
61
|
+
verify: python -m doctest README.md
|
|
62
|
+
see: docs/index.md, docs/getting-started.md, AGENTS.md
|
|
63
|
+
-->
|
|
64
|
+
|
|
65
|
+
scriptconv-nonfree holds the phonemizer backends of
|
|
66
|
+
[scriptconv](https://github.com/TigreGotico/scriptconv) whose code, data or
|
|
67
|
+
dependencies are for non-commercial use only, or carry no licence grant.
|
|
68
|
+
scriptconv keeps the registry, and its extras install this package, so you
|
|
69
|
+
call the backends through scriptconv as usual. Do not use them in a commercial
|
|
70
|
+
product.
|
|
71
|
+
|
|
72
|
+
## Quickstart
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
uv pip install --prerelease=allow "scriptconv[ar-phonemizers]"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
>>> from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
80
|
+
>>> get_phonemizer(Phonemizer.MANTOQ).phonemize_string("مَرْحَبًا بِالْعَالَمِ", "ar")
|
|
81
|
+
'marħabanaː bilʕaːlami'
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
mantoq reads the diacritics of the text and adds none.
|
|
86
|
+
[Getting started](docs/getting-started.md) walks through the alphabets, the
|
|
87
|
+
African backends and the draft rule tables.
|
|
88
|
+
|
|
89
|
+
## Backends
|
|
90
|
+
|
|
91
|
+
| `Phonemizer` values | scriptconv extra | Restricted item |
|
|
92
|
+
| --- | --- | --- |
|
|
93
|
+
| `mantoq`, `halabi`, `iqra` | `ar-phonemizers` | the Arabic-Phonetiser of Nawar Halabi, CC-BY-NC-4.0 |
|
|
94
|
+
| `viphoneme` | `vi` | viphoneme and vinorm, "Free for non-commercial use" |
|
|
95
|
+
| `africa_g2p` | `africa` | the africa-g2p rule tables, with no licence grant |
|
|
96
|
+
| `ghana_g2p` | `ghana` | the same rule tables, which ghana-g2p loads |
|
|
97
|
+
|
|
98
|
+
scriptconv never picks one of these backends by default: the Arabic default
|
|
99
|
+
is arbtok. The [backend reference](docs/backends.md) gives the languages,
|
|
100
|
+
alphabets and parameters of each backend.
|
|
101
|
+
|
|
102
|
+
## Licence
|
|
103
|
+
|
|
104
|
+
The package is `Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data`.
|
|
105
|
+
Its own glue code is Apache-2.0. The vendored mantoq code is MIT, except the
|
|
106
|
+
phonetiser and `num2words.py`. The two vendored copies of the Arabic phonetiser are
|
|
107
|
+
CC-BY-NC-4.0, which forbids commercial use. `LICENSE.africa-g2p-data.md`
|
|
108
|
+
states the terms of the africa-g2p rule tables, which the `africa` and `ghana`
|
|
109
|
+
backends load: they are not for commercial use. [Licences](docs/licences.md)
|
|
110
|
+
gives the restricted item of each backend and the licence of each file.
|
|
111
|
+
|
|
112
|
+
## Documentation
|
|
113
|
+
|
|
114
|
+
The [documentation index](docs/index.md) lists every page in reading order.
|
|
115
|
+
The [scriptconv documentation](https://github.com/TigreGotico/scriptconv/tree/dev/docs)
|
|
116
|
+
explains the phonemizer contract and the other backends.
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_halabi_iqra.py
RENAMED
|
@@ -206,5 +206,25 @@ class TestMantoqHalabiLabelingIsAccurate(unittest.TestCase):
|
|
|
206
206
|
halabi.phonemize_string(EXAMPLE, "ar"))
|
|
207
207
|
|
|
208
208
|
|
|
209
|
+
class TestTheh(unittest.TestCase):
|
|
210
|
+
"""Halabi's notation writes ث as ``^`` (IPA θ). The standard Buckwalter
|
|
211
|
+
table of scriptconv.notation writes it as ``v``, which the phonetiser
|
|
212
|
+
does not read."""
|
|
213
|
+
|
|
214
|
+
def test_each_theh_keeps_its_phoneme(self):
|
|
215
|
+
word = "ثلاثة"
|
|
216
|
+
for member in (Phonemizer.MANTOQ, Phonemizer.HALABI, Phonemizer.IQRA):
|
|
217
|
+
with self.subTest(member=member.value):
|
|
218
|
+
result = get_phonemizer(member, alphabet=Alphabet.HALABI).phonemize_string(word, "ar")
|
|
219
|
+
self.assertEqual(result.count("^"), word.count("ث"), result)
|
|
220
|
+
|
|
221
|
+
def test_halabi_reads_theh_as_iqra_does(self):
|
|
222
|
+
word = "ثَوْب"
|
|
223
|
+
expected = get_phonemizer(Phonemizer.IQRA, alphabet=Alphabet.HALABI).phonemize_string(word, "ar")
|
|
224
|
+
self.assertEqual(expected, "^ a w b")
|
|
225
|
+
result = get_phonemizer(Phonemizer.HALABI, alphabet=Alphabet.HALABI).phonemize_string(word, "ar")
|
|
226
|
+
self.assertEqual(result, expected)
|
|
227
|
+
|
|
228
|
+
|
|
209
229
|
if __name__ == "__main__":
|
|
210
230
|
unittest.main()
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: scriptconv-nonfree
|
|
3
|
-
Version: 0.2.1a1
|
|
4
|
-
Summary: scriptconv phonemizer backends whose code, data or dependencies are non-commercial or carry no licence grant
|
|
5
|
-
Author-email: TigreGotico <contact@tigregotico.com>
|
|
6
|
-
License-Expression: Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data
|
|
7
|
-
Project-URL: Homepage, https://github.com/TigreGotico/scriptconv-nonfree
|
|
8
|
-
Project-URL: Repository, https://github.com/TigreGotico/scriptconv-nonfree
|
|
9
|
-
Project-URL: Issues, https://github.com/TigreGotico/scriptconv-nonfree/issues
|
|
10
|
-
Keywords: g2p,phonemizer,tts,scriptconv,arabic,mantoq,halabi,iqra,vietnamese,african-languages
|
|
11
|
-
Classifier: Development Status :: 3 - Alpha
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Classifier: Topic :: Text Processing :: Linguistic
|
|
19
|
-
Requires-Python: >=3.11
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.md
|
|
23
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.mantoq
|
|
24
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.cc-by-nc-4.0
|
|
25
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.md
|
|
26
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.cc-by-nc-4.0
|
|
27
|
-
License-File: LICENSE.africa-g2p-data.md
|
|
28
|
-
Requires-Dist: scriptconv[phonemizers]>=0.0.4a98
|
|
29
|
-
Provides-Extra: ar-phonemizers
|
|
30
|
-
Requires-Dist: ovos-number-parser; extra == "ar-phonemizers"
|
|
31
|
-
Provides-Extra: vi
|
|
32
|
-
Requires-Dist: viphoneme; python_version < "3.12" and extra == "vi"
|
|
33
|
-
Requires-Dist: vinorm; python_version < "3.12" and extra == "vi"
|
|
34
|
-
Requires-Dist: underthesea; python_version < "3.12" and extra == "vi"
|
|
35
|
-
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "vi"
|
|
36
|
-
Provides-Extra: africa
|
|
37
|
-
Requires-Dist: africa-g2p>=0.3.5; extra == "africa"
|
|
38
|
-
Provides-Extra: ghana
|
|
39
|
-
Requires-Dist: ghana-g2p>=0.1.1; extra == "ghana"
|
|
40
|
-
Requires-Dist: africa-g2p>=0.3.5; extra == "ghana"
|
|
41
|
-
Provides-Extra: test
|
|
42
|
-
Requires-Dist: pytest; extra == "test"
|
|
43
|
-
Requires-Dist: pytest-timeout; extra == "test"
|
|
44
|
-
Requires-Dist: ovos-number-parser; extra == "test"
|
|
45
|
-
Requires-Dist: africa-g2p>=0.3.5; extra == "test"
|
|
46
|
-
Requires-Dist: ghana-g2p>=0.1.1; extra == "test"
|
|
47
|
-
Requires-Dist: viphoneme; python_version < "3.12" and extra == "test"
|
|
48
|
-
Requires-Dist: vinorm; python_version < "3.12" and extra == "test"
|
|
49
|
-
Requires-Dist: underthesea; python_version < "3.12" and extra == "test"
|
|
50
|
-
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "test"
|
|
51
|
-
Requires-Dist: linguatag[langcodes]>=0.2.3a1; extra == "test"
|
|
52
|
-
Requires-Dist: packaging; extra == "test"
|
|
53
|
-
Dynamic: license-file
|
|
54
|
-
|
|
55
|
-
# scriptconv-nonfree
|
|
56
|
-
|
|
57
|
-
The scriptconv phonemizer backends whose code, data or dependencies are for non-commercial use only, or carry no licence grant.
|
|
58
|
-
|
|
59
|
-
## Where this fits
|
|
60
|
-
|
|
61
|
-
[scriptconv](https://github.com/TigreGotico/scriptconv) is the text conversion library. Its wheel holds only Apache-2.0 code. Each backend in this package has a non-commercial licence, or data with no licence grant, somewhere in its chain, so it ships here instead.
|
|
62
|
-
|
|
63
|
-
scriptconv keeps the registry. A backend keeps its `Phonemizer` value and its routing entry in scriptconv, and scriptconv imports the class from this package only when a caller asks for that backend. The scriptconv extra of each backend installs this package:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
pip install scriptconv[ar-phonemizers]
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
```python
|
|
70
|
-
from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
71
|
-
|
|
72
|
-
get_phonemizer(Phonemizer.MANTOQ).phonemize_string("مرحبا", "ar")
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
This package depends on scriptconv. scriptconv never imports this package when it is imported itself.
|
|
76
|
-
|
|
77
|
-
## Backends
|
|
78
|
-
|
|
79
|
-
| `Phonemizer` value | Class | Module | Restricted item in the chain |
|
|
80
|
-
| --- | --- | --- | --- |
|
|
81
|
-
| `mantoq` | `MantoqPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the vendored Halabi phonetiser in mantoq (CC-BY-NC-4.0) |
|
|
82
|
-
| `halabi` | `HalabiPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the same vendored phonetiser (CC-BY-NC-4.0) |
|
|
83
|
-
| `iqra` | `IqraPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the vendored IqraEval phonetiser (CC-BY-NC-4.0) |
|
|
84
|
-
| `viphoneme` | `VIPhonemePhonemizer` | `scriptconv_nonfree.phonemizers.vi` | viphoneme and vinorm, which PyPI marks "Free for non-commercial use" |
|
|
85
|
-
| `africa_g2p` | `AfricaG2PPhonemizer` | `scriptconv_nonfree.phonemizers.africa` | the africa-g2p language data, which has no licence grant |
|
|
86
|
-
| `ghana_g2p` | `GhanaG2PPhonemizer` | `scriptconv_nonfree.phonemizers.ghana` | the same africa-g2p language data, which ghana-g2p loads |
|
|
87
|
-
|
|
88
|
-
Each backend's own dependencies install with the extra of the same name, for example `pip install scriptconv-nonfree[vi]`.
|
|
89
|
-
|
|
90
|
-
## The African backends
|
|
91
|
-
|
|
92
|
-
The `africa` extra installs `africa-g2p>=0.3.5` from PyPI (AfriSpeech/africa-g2p). The `ghana` extra installs `ghana-g2p>=0.1.1` (GhanaNLP/ghana-g2p) with the same africa-g2p floor. ghana-g2p loads the same installed africa-g2p, so the two backends always read the same rule tables. `identity()` of `AfricaG2PPhonemizer` gives the africa-g2p version, and `identity()` of `GhanaG2PPhonemizer` gives the ghana-g2p version.
|
|
93
|
-
|
|
94
|
-
Each africa-g2p rule table has a `confidence` field. A table with `omniglot`, `high`, `medium` or `hand-verified` is transcribed from an Omniglot chart or from Hartell (ed.), *Alphabets of Africa* (UNESCO, 1993). Both backends serve these tables by default.
|
|
95
|
-
|
|
96
|
-
They also serve the 5 `tts-reviewed` tables of africa-g2p 0.3.5 by default: Dagbani, Ewe, Fante, Ga and Twi. Each is an Omniglot chart with corrections that an LLM proposed. No native speaker has checked the corrections. The corrected Ewe table measures closer to WikiPron Ewe than the chart it replaces: phoneme error rate 0.4690 against 0.4948 on 247 words.
|
|
97
|
-
|
|
98
|
-
Every other value is a draft, also a value that a later africa-g2p adds. In africa-g2p 0.3.5, 352 tables are `llm-draft`: an LLM drafted them from corpus text, and no chart backs them. Both backends refuse a draft table. The error is `UnsupportedLanguageError`, and its message names the table, its `confidence` value and the africa-g2p version. To use draft tables, build the backend with `allow_draft_rules=True`:
|
|
99
|
-
|
|
100
|
-
```python
|
|
101
|
-
from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
102
|
-
|
|
103
|
-
get_phonemizer(Phonemizer.AFRICA_G2P, allow_draft_rules=True).phonemize_string("aba", "aab")
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
`supported_langs()` lists the tables served by default: 398 of the 750 tables of africa-g2p 0.3.5, and all 42 ghana-g2p languages. `supported_langs(allow_draft_rules=True)` lists all of them.
|
|
107
|
-
|
|
108
|
-
## Licence
|
|
109
|
-
|
|
110
|
-
The package holds files under several licences. The SPDX expression is `Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data`.
|
|
111
|
-
|
|
112
|
-
| Files | Licence | Notice |
|
|
113
|
-
| --- | --- | --- |
|
|
114
|
-
| `scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/phonetise_buckwalter.py` | CC-BY-NC-4.0 | `LICENSE.md` and `LICENSE.cc-by-nc-4.0` in `_vendored/mantoq/`. Upstream: nawarhalabi/Arabic-Phonetiser. |
|
|
115
|
-
| `scriptconv_nonfree/phonemizers/_vendored/mantoq/num2words.py` | Apache-2.0 | `LICENSE`. Written for scriptconv on top of ovos-number-parser. |
|
|
116
|
-
| every other file in `scriptconv_nonfree/phonemizers/_vendored/mantoq/` | MIT | `LICENSE.mantoq` in that directory. Upstream: mush42/mantoq. |
|
|
117
|
-
| `scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/` | CC-BY-NC-4.0 | `LICENSE.md` and `LICENSE.cc-by-nc-4.0` in that directory. Upstream: Iqra-Eval/MSA_phonetiser, a fork of Arabic-Phonetiser. |
|
|
118
|
-
| every other file | Apache-2.0 | `LICENSE` |
|
|
119
|
-
|
|
120
|
-
`LicenseRef-AfricaG2P-Data` is the language data of the installed africa-g2p distribution, which the `africa` and `ghana` backends load. This package holds no copy of it. The code of africa-g2p is Apache-2.0, but its rule tables have no licence grant. `LICENSE.africa-g2p-data.md` states the terms and quotes the upstream data notice.
|
|
121
|
-
|
|
122
|
-
The CC-BY-NC-4.0 files and the africa-g2p data are not for commercial use. The dependencies of each backend keep their own licences.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# scriptconv-nonfree
|
|
2
|
-
|
|
3
|
-
The scriptconv phonemizer backends whose code, data or dependencies are for non-commercial use only, or carry no licence grant.
|
|
4
|
-
|
|
5
|
-
## Where this fits
|
|
6
|
-
|
|
7
|
-
[scriptconv](https://github.com/TigreGotico/scriptconv) is the text conversion library. Its wheel holds only Apache-2.0 code. Each backend in this package has a non-commercial licence, or data with no licence grant, somewhere in its chain, so it ships here instead.
|
|
8
|
-
|
|
9
|
-
scriptconv keeps the registry. A backend keeps its `Phonemizer` value and its routing entry in scriptconv, and scriptconv imports the class from this package only when a caller asks for that backend. The scriptconv extra of each backend installs this package:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
pip install scriptconv[ar-phonemizers]
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
```python
|
|
16
|
-
from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
17
|
-
|
|
18
|
-
get_phonemizer(Phonemizer.MANTOQ).phonemize_string("مرحبا", "ar")
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
This package depends on scriptconv. scriptconv never imports this package when it is imported itself.
|
|
22
|
-
|
|
23
|
-
## Backends
|
|
24
|
-
|
|
25
|
-
| `Phonemizer` value | Class | Module | Restricted item in the chain |
|
|
26
|
-
| --- | --- | --- | --- |
|
|
27
|
-
| `mantoq` | `MantoqPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the vendored Halabi phonetiser in mantoq (CC-BY-NC-4.0) |
|
|
28
|
-
| `halabi` | `HalabiPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the same vendored phonetiser (CC-BY-NC-4.0) |
|
|
29
|
-
| `iqra` | `IqraPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the vendored IqraEval phonetiser (CC-BY-NC-4.0) |
|
|
30
|
-
| `viphoneme` | `VIPhonemePhonemizer` | `scriptconv_nonfree.phonemizers.vi` | viphoneme and vinorm, which PyPI marks "Free for non-commercial use" |
|
|
31
|
-
| `africa_g2p` | `AfricaG2PPhonemizer` | `scriptconv_nonfree.phonemizers.africa` | the africa-g2p language data, which has no licence grant |
|
|
32
|
-
| `ghana_g2p` | `GhanaG2PPhonemizer` | `scriptconv_nonfree.phonemizers.ghana` | the same africa-g2p language data, which ghana-g2p loads |
|
|
33
|
-
|
|
34
|
-
Each backend's own dependencies install with the extra of the same name, for example `pip install scriptconv-nonfree[vi]`.
|
|
35
|
-
|
|
36
|
-
## The African backends
|
|
37
|
-
|
|
38
|
-
The `africa` extra installs `africa-g2p>=0.3.5` from PyPI (AfriSpeech/africa-g2p). The `ghana` extra installs `ghana-g2p>=0.1.1` (GhanaNLP/ghana-g2p) with the same africa-g2p floor. ghana-g2p loads the same installed africa-g2p, so the two backends always read the same rule tables. `identity()` of `AfricaG2PPhonemizer` gives the africa-g2p version, and `identity()` of `GhanaG2PPhonemizer` gives the ghana-g2p version.
|
|
39
|
-
|
|
40
|
-
Each africa-g2p rule table has a `confidence` field. A table with `omniglot`, `high`, `medium` or `hand-verified` is transcribed from an Omniglot chart or from Hartell (ed.), *Alphabets of Africa* (UNESCO, 1993). Both backends serve these tables by default.
|
|
41
|
-
|
|
42
|
-
They also serve the 5 `tts-reviewed` tables of africa-g2p 0.3.5 by default: Dagbani, Ewe, Fante, Ga and Twi. Each is an Omniglot chart with corrections that an LLM proposed. No native speaker has checked the corrections. The corrected Ewe table measures closer to WikiPron Ewe than the chart it replaces: phoneme error rate 0.4690 against 0.4948 on 247 words.
|
|
43
|
-
|
|
44
|
-
Every other value is a draft, also a value that a later africa-g2p adds. In africa-g2p 0.3.5, 352 tables are `llm-draft`: an LLM drafted them from corpus text, and no chart backs them. Both backends refuse a draft table. The error is `UnsupportedLanguageError`, and its message names the table, its `confidence` value and the africa-g2p version. To use draft tables, build the backend with `allow_draft_rules=True`:
|
|
45
|
-
|
|
46
|
-
```python
|
|
47
|
-
from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
48
|
-
|
|
49
|
-
get_phonemizer(Phonemizer.AFRICA_G2P, allow_draft_rules=True).phonemize_string("aba", "aab")
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
`supported_langs()` lists the tables served by default: 398 of the 750 tables of africa-g2p 0.3.5, and all 42 ghana-g2p languages. `supported_langs(allow_draft_rules=True)` lists all of them.
|
|
53
|
-
|
|
54
|
-
## Licence
|
|
55
|
-
|
|
56
|
-
The package holds files under several licences. The SPDX expression is `Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data`.
|
|
57
|
-
|
|
58
|
-
| Files | Licence | Notice |
|
|
59
|
-
| --- | --- | --- |
|
|
60
|
-
| `scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/phonetise_buckwalter.py` | CC-BY-NC-4.0 | `LICENSE.md` and `LICENSE.cc-by-nc-4.0` in `_vendored/mantoq/`. Upstream: nawarhalabi/Arabic-Phonetiser. |
|
|
61
|
-
| `scriptconv_nonfree/phonemizers/_vendored/mantoq/num2words.py` | Apache-2.0 | `LICENSE`. Written for scriptconv on top of ovos-number-parser. |
|
|
62
|
-
| every other file in `scriptconv_nonfree/phonemizers/_vendored/mantoq/` | MIT | `LICENSE.mantoq` in that directory. Upstream: mush42/mantoq. |
|
|
63
|
-
| `scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/` | CC-BY-NC-4.0 | `LICENSE.md` and `LICENSE.cc-by-nc-4.0` in that directory. Upstream: Iqra-Eval/MSA_phonetiser, a fork of Arabic-Phonetiser. |
|
|
64
|
-
| every other file | Apache-2.0 | `LICENSE` |
|
|
65
|
-
|
|
66
|
-
`LicenseRef-AfricaG2P-Data` is the language data of the installed africa-g2p distribution, which the `africa` and `ghana` backends load. This package holds no copy of it. The code of africa-g2p is Apache-2.0, but its rule tables have no licence grant. `LICENSE.africa-g2p-data.md` states the terms and quotes the upstream data notice.
|
|
67
|
-
|
|
68
|
-
The CC-BY-NC-4.0 files and the africa-g2p data are not for commercial use. The dependencies of each backend keep their own licences.
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: scriptconv-nonfree
|
|
3
|
-
Version: 0.2.1a1
|
|
4
|
-
Summary: scriptconv phonemizer backends whose code, data or dependencies are non-commercial or carry no licence grant
|
|
5
|
-
Author-email: TigreGotico <contact@tigregotico.com>
|
|
6
|
-
License-Expression: Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data
|
|
7
|
-
Project-URL: Homepage, https://github.com/TigreGotico/scriptconv-nonfree
|
|
8
|
-
Project-URL: Repository, https://github.com/TigreGotico/scriptconv-nonfree
|
|
9
|
-
Project-URL: Issues, https://github.com/TigreGotico/scriptconv-nonfree/issues
|
|
10
|
-
Keywords: g2p,phonemizer,tts,scriptconv,arabic,mantoq,halabi,iqra,vietnamese,african-languages
|
|
11
|
-
Classifier: Development Status :: 3 - Alpha
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Classifier: Topic :: Text Processing :: Linguistic
|
|
19
|
-
Requires-Python: >=3.11
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.md
|
|
23
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.mantoq
|
|
24
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.cc-by-nc-4.0
|
|
25
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.md
|
|
26
|
-
License-File: scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.cc-by-nc-4.0
|
|
27
|
-
License-File: LICENSE.africa-g2p-data.md
|
|
28
|
-
Requires-Dist: scriptconv[phonemizers]>=0.0.4a98
|
|
29
|
-
Provides-Extra: ar-phonemizers
|
|
30
|
-
Requires-Dist: ovos-number-parser; extra == "ar-phonemizers"
|
|
31
|
-
Provides-Extra: vi
|
|
32
|
-
Requires-Dist: viphoneme; python_version < "3.12" and extra == "vi"
|
|
33
|
-
Requires-Dist: vinorm; python_version < "3.12" and extra == "vi"
|
|
34
|
-
Requires-Dist: underthesea; python_version < "3.12" and extra == "vi"
|
|
35
|
-
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "vi"
|
|
36
|
-
Provides-Extra: africa
|
|
37
|
-
Requires-Dist: africa-g2p>=0.3.5; extra == "africa"
|
|
38
|
-
Provides-Extra: ghana
|
|
39
|
-
Requires-Dist: ghana-g2p>=0.1.1; extra == "ghana"
|
|
40
|
-
Requires-Dist: africa-g2p>=0.3.5; extra == "ghana"
|
|
41
|
-
Provides-Extra: test
|
|
42
|
-
Requires-Dist: pytest; extra == "test"
|
|
43
|
-
Requires-Dist: pytest-timeout; extra == "test"
|
|
44
|
-
Requires-Dist: ovos-number-parser; extra == "test"
|
|
45
|
-
Requires-Dist: africa-g2p>=0.3.5; extra == "test"
|
|
46
|
-
Requires-Dist: ghana-g2p>=0.1.1; extra == "test"
|
|
47
|
-
Requires-Dist: viphoneme; python_version < "3.12" and extra == "test"
|
|
48
|
-
Requires-Dist: vinorm; python_version < "3.12" and extra == "test"
|
|
49
|
-
Requires-Dist: underthesea; python_version < "3.12" and extra == "test"
|
|
50
|
-
Requires-Dist: eng_to_ipa; python_version < "3.12" and extra == "test"
|
|
51
|
-
Requires-Dist: linguatag[langcodes]>=0.2.3a1; extra == "test"
|
|
52
|
-
Requires-Dist: packaging; extra == "test"
|
|
53
|
-
Dynamic: license-file
|
|
54
|
-
|
|
55
|
-
# scriptconv-nonfree
|
|
56
|
-
|
|
57
|
-
The scriptconv phonemizer backends whose code, data or dependencies are for non-commercial use only, or carry no licence grant.
|
|
58
|
-
|
|
59
|
-
## Where this fits
|
|
60
|
-
|
|
61
|
-
[scriptconv](https://github.com/TigreGotico/scriptconv) is the text conversion library. Its wheel holds only Apache-2.0 code. Each backend in this package has a non-commercial licence, or data with no licence grant, somewhere in its chain, so it ships here instead.
|
|
62
|
-
|
|
63
|
-
scriptconv keeps the registry. A backend keeps its `Phonemizer` value and its routing entry in scriptconv, and scriptconv imports the class from this package only when a caller asks for that backend. The scriptconv extra of each backend installs this package:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
pip install scriptconv[ar-phonemizers]
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
```python
|
|
70
|
-
from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
71
|
-
|
|
72
|
-
get_phonemizer(Phonemizer.MANTOQ).phonemize_string("مرحبا", "ar")
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
This package depends on scriptconv. scriptconv never imports this package when it is imported itself.
|
|
76
|
-
|
|
77
|
-
## Backends
|
|
78
|
-
|
|
79
|
-
| `Phonemizer` value | Class | Module | Restricted item in the chain |
|
|
80
|
-
| --- | --- | --- | --- |
|
|
81
|
-
| `mantoq` | `MantoqPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the vendored Halabi phonetiser in mantoq (CC-BY-NC-4.0) |
|
|
82
|
-
| `halabi` | `HalabiPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the same vendored phonetiser (CC-BY-NC-4.0) |
|
|
83
|
-
| `iqra` | `IqraPhonemizer` | `scriptconv_nonfree.phonemizers.ar` | the vendored IqraEval phonetiser (CC-BY-NC-4.0) |
|
|
84
|
-
| `viphoneme` | `VIPhonemePhonemizer` | `scriptconv_nonfree.phonemizers.vi` | viphoneme and vinorm, which PyPI marks "Free for non-commercial use" |
|
|
85
|
-
| `africa_g2p` | `AfricaG2PPhonemizer` | `scriptconv_nonfree.phonemizers.africa` | the africa-g2p language data, which has no licence grant |
|
|
86
|
-
| `ghana_g2p` | `GhanaG2PPhonemizer` | `scriptconv_nonfree.phonemizers.ghana` | the same africa-g2p language data, which ghana-g2p loads |
|
|
87
|
-
|
|
88
|
-
Each backend's own dependencies install with the extra of the same name, for example `pip install scriptconv-nonfree[vi]`.
|
|
89
|
-
|
|
90
|
-
## The African backends
|
|
91
|
-
|
|
92
|
-
The `africa` extra installs `africa-g2p>=0.3.5` from PyPI (AfriSpeech/africa-g2p). The `ghana` extra installs `ghana-g2p>=0.1.1` (GhanaNLP/ghana-g2p) with the same africa-g2p floor. ghana-g2p loads the same installed africa-g2p, so the two backends always read the same rule tables. `identity()` of `AfricaG2PPhonemizer` gives the africa-g2p version, and `identity()` of `GhanaG2PPhonemizer` gives the ghana-g2p version.
|
|
93
|
-
|
|
94
|
-
Each africa-g2p rule table has a `confidence` field. A table with `omniglot`, `high`, `medium` or `hand-verified` is transcribed from an Omniglot chart or from Hartell (ed.), *Alphabets of Africa* (UNESCO, 1993). Both backends serve these tables by default.
|
|
95
|
-
|
|
96
|
-
They also serve the 5 `tts-reviewed` tables of africa-g2p 0.3.5 by default: Dagbani, Ewe, Fante, Ga and Twi. Each is an Omniglot chart with corrections that an LLM proposed. No native speaker has checked the corrections. The corrected Ewe table measures closer to WikiPron Ewe than the chart it replaces: phoneme error rate 0.4690 against 0.4948 on 247 words.
|
|
97
|
-
|
|
98
|
-
Every other value is a draft, also a value that a later africa-g2p adds. In africa-g2p 0.3.5, 352 tables are `llm-draft`: an LLM drafted them from corpus text, and no chart backs them. Both backends refuse a draft table. The error is `UnsupportedLanguageError`, and its message names the table, its `confidence` value and the africa-g2p version. To use draft tables, build the backend with `allow_draft_rules=True`:
|
|
99
|
-
|
|
100
|
-
```python
|
|
101
|
-
from scriptconv.phonemizers import Phonemizer, get_phonemizer
|
|
102
|
-
|
|
103
|
-
get_phonemizer(Phonemizer.AFRICA_G2P, allow_draft_rules=True).phonemize_string("aba", "aab")
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
`supported_langs()` lists the tables served by default: 398 of the 750 tables of africa-g2p 0.3.5, and all 42 ghana-g2p languages. `supported_langs(allow_draft_rules=True)` lists all of them.
|
|
107
|
-
|
|
108
|
-
## Licence
|
|
109
|
-
|
|
110
|
-
The package holds files under several licences. The SPDX expression is `Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data`.
|
|
111
|
-
|
|
112
|
-
| Files | Licence | Notice |
|
|
113
|
-
| --- | --- | --- |
|
|
114
|
-
| `scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/phonetise_buckwalter.py` | CC-BY-NC-4.0 | `LICENSE.md` and `LICENSE.cc-by-nc-4.0` in `_vendored/mantoq/`. Upstream: nawarhalabi/Arabic-Phonetiser. |
|
|
115
|
-
| `scriptconv_nonfree/phonemizers/_vendored/mantoq/num2words.py` | Apache-2.0 | `LICENSE`. Written for scriptconv on top of ovos-number-parser. |
|
|
116
|
-
| every other file in `scriptconv_nonfree/phonemizers/_vendored/mantoq/` | MIT | `LICENSE.mantoq` in that directory. Upstream: mush42/mantoq. |
|
|
117
|
-
| `scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/` | CC-BY-NC-4.0 | `LICENSE.md` and `LICENSE.cc-by-nc-4.0` in that directory. Upstream: Iqra-Eval/MSA_phonetiser, a fork of Arabic-Phonetiser. |
|
|
118
|
-
| every other file | Apache-2.0 | `LICENSE` |
|
|
119
|
-
|
|
120
|
-
`LicenseRef-AfricaG2P-Data` is the language data of the installed africa-g2p distribution, which the `africa` and `ghana` backends load. This package holds no copy of it. The code of africa-g2p is Apache-2.0, but its rule tables have no licence grant. `LICENSE.africa-g2p-data.md` states the terms and quotes the upstream data notice.
|
|
121
|
-
|
|
122
|
-
The CC-BY-NC-4.0 files and the africa-g2p data are not for commercial use. The dependencies of each backend keep their own licences.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/africa.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ar.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ghana.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/vi.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/requires.txt
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_match_lang_direction.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a1 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_identity.py
RENAMED
|
File without changes
|
|
File without changes
|