scriptconv-nonfree 0.2.1a2__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.1a2/scriptconv_nonfree.egg-info → scriptconv_nonfree-0.2.2a1}/PKG-INFO +1 -1
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/phonetise_buckwalter.py +8 -1
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/version.py +2 -2
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1/scriptconv_nonfree.egg-info}/PKG-INFO +1 -1
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_halabi_iqra.py +20 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/LICENSE +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/LICENSE.africa-g2p-data.md +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/README.md +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/pyproject.toml +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.cc-by-nc-4.0 +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.md +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/phonetiser.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.cc-by-nc-4.0 +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.mantoq +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.md +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/__init__.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/symbols.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/tokenization.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/num2words.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/_vendored/mantoq/unicode_symbol2label.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/africa.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ar.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ghana.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/vi.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/SOURCES.txt +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/dependency_links.txt +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/requires.txt +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/top_level.txt +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/setup.cfg +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_match_lang_direction.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_africa.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_cjk_ar.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_friendly_import_errors.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_ghana.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_identity.py +0 -0
- {scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_mantoq_long_digits.py +0 -0
{scriptconv_nonfree-0.2.1a2/scriptconv_nonfree.egg-info → scriptconv_nonfree-0.2.2a1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptconv-nonfree
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2a1
|
|
4
4
|
Summary: scriptconv phonemizer backends whose code, data or dependencies are non-commercial or carry no licence grant
|
|
5
5
|
Author-email: TigreGotico <contact@tigregotico.com>
|
|
6
6
|
License-Expression: Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data
|
|
@@ -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
|
# ----------------------------------------------------------------------------
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# START_VERSION_BLOCK
|
|
2
2
|
VERSION_MAJOR = 0
|
|
3
3
|
VERSION_MINOR = 2
|
|
4
|
-
VERSION_BUILD =
|
|
5
|
-
VERSION_ALPHA =
|
|
4
|
+
VERSION_BUILD = 2
|
|
5
|
+
VERSION_ALPHA = 1
|
|
6
6
|
# END_VERSION_BLOCK
|
|
7
7
|
|
|
8
8
|
__version__ = f"{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_BUILD}" + (f"a{VERSION_ALPHA}" if VERSION_ALPHA else "")
|
{scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1/scriptconv_nonfree.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptconv-nonfree
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2a1
|
|
4
4
|
Summary: scriptconv phonemizer backends whose code, data or dependencies are non-commercial or carry no licence grant
|
|
5
5
|
Author-email: TigreGotico <contact@tigregotico.com>
|
|
6
6
|
License-Expression: Apache-2.0 AND MIT AND CC-BY-NC-4.0 AND LicenseRef-AfricaG2P-Data
|
{scriptconv_nonfree-0.2.1a2 → 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()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → 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.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/africa.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ar.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/ghana.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree/phonemizers/vi.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/requires.txt
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → scriptconv_nonfree-0.2.2a1}/scriptconv_nonfree.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.1a2 → 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.1a2 → scriptconv_nonfree-0.2.2a1}/tests/test_phonemizers_identity.py
RENAMED
|
File without changes
|
|
File without changes
|