scriptconv-nonfree 0.2.2a1__tar.gz → 0.2.3a2__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/scriptconv_nonfree.egg-info → scriptconv_nonfree-0.2.3a2}/PKG-INFO +1 -1
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/africa.py +11 -9
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/ghana.py +11 -10
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/version.py +2 -2
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2/scriptconv_nonfree.egg-info}/PKG-INFO +1 -1
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_africa.py +12 -9
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_ghana.py +13 -4
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/LICENSE +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/LICENSE.africa-g2p-data.md +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/README.md +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/pyproject.toml +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/__init__.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/__init__.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/__init__.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.cc-by-nc-4.0 +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/LICENSE.md +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/__init__.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/iqra_phonetiser/phonetiser.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.cc-by-nc-4.0 +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.mantoq +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/LICENSE.md +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/__init__.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/__init__.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/phonetise_buckwalter.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/symbols.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/buck/tokenization.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/num2words.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/_vendored/mantoq/unicode_symbol2label.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/ar.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/vi.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree.egg-info/SOURCES.txt +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree.egg-info/dependency_links.txt +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree.egg-info/requires.txt +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree.egg-info/top_level.txt +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/setup.cfg +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_match_lang_direction.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_cjk_ar.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_friendly_import_errors.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_halabi_iqra.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_identity.py +0 -0
- {scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_mantoq_long_digits.py +0 -0
{scriptconv_nonfree-0.2.2a1/scriptconv_nonfree.egg-info → scriptconv_nonfree-0.2.3a2}/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.3a2
|
|
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.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/africa.py
RENAMED
|
@@ -109,9 +109,12 @@ class AfricaG2PPhonemizer(BasePhonemizer):
|
|
|
109
109
|
self.allow_draft_rules = allow_draft_rules
|
|
110
110
|
self._cache: dict[str, object] = {}
|
|
111
111
|
|
|
112
|
-
def _engine(self, resolved_lang: str):
|
|
113
|
-
"""Return, lazily creating and caching, the pipeline for *resolved_lang*.
|
|
112
|
+
def _engine(self, resolved_lang: str, target_lang: str):
|
|
113
|
+
"""Return, lazily creating and caching, the pipeline for *resolved_lang*. A draft table is refused unless
|
|
114
|
+
the instance was built with ``allow_draft_rules=True``."""
|
|
114
115
|
if resolved_lang not in self._cache:
|
|
116
|
+
if not self.allow_draft_rules:
|
|
117
|
+
refuse_draft(resolved_lang, target_lang, "africa-g2p")
|
|
115
118
|
output = "ipa" if self.alphabet == Alphabet.IPA else "grapheme"
|
|
116
119
|
self._cache[resolved_lang] = _africa_g2p().AfricaPipeline(
|
|
117
120
|
lang=resolved_lang, output=output)
|
|
@@ -124,9 +127,11 @@ class AfricaG2PPhonemizer(BasePhonemizer):
|
|
|
124
127
|
return _africa_g2p().available_languages()
|
|
125
128
|
return list(_served_tables())
|
|
126
129
|
|
|
127
|
-
|
|
130
|
+
@classmethod
|
|
131
|
+
def get_lang(cls, target_lang: str) -> str:
|
|
128
132
|
"""
|
|
129
|
-
Resolve *target_lang* to an africa-g2p rule table.
|
|
133
|
+
Resolve *target_lang* to an africa-g2p rule table. A draft table
|
|
134
|
+
resolves too: the instance refuses it at first use.
|
|
130
135
|
|
|
131
136
|
Two exact lookups, in order, and no fuzzing (africa-g2p keys its rule
|
|
132
137
|
files by name, not by BCP-47 macrolanguage/region mapping, so
|
|
@@ -148,8 +153,7 @@ class AfricaG2PPhonemizer(BasePhonemizer):
|
|
|
148
153
|
|
|
149
154
|
Raises:
|
|
150
155
|
UnsupportedLanguageError: If africa-g2p has no rule table for
|
|
151
|
-
*target_lang
|
|
152
|
-
was not built with ``allow_draft_rules=True``.
|
|
156
|
+
*target_lang*.
|
|
153
157
|
"""
|
|
154
158
|
tables = _africa_g2p().available_languages()
|
|
155
159
|
lowered = target_lang.lower()
|
|
@@ -158,10 +162,8 @@ class AfricaG2PPhonemizer(BasePhonemizer):
|
|
|
158
162
|
# tried as written before ``_`` is read as ``-``.
|
|
159
163
|
for table in (lowered, lowered.replace("_", "-"), _primary_subtag(target_lang)):
|
|
160
164
|
if table in tables:
|
|
161
|
-
if not self.allow_draft_rules:
|
|
162
|
-
refuse_draft(table, target_lang, "africa-g2p")
|
|
163
165
|
return table
|
|
164
166
|
raise UnsupportedLanguageError(f"africa-g2p: unsupported language {target_lang!r}")
|
|
165
167
|
|
|
166
168
|
def phonemize_string(self, text: str, lang: str) -> str:
|
|
167
|
-
return self._engine(self.get_lang(lang)).run(text, sep=" ")
|
|
169
|
+
return self._engine(self.get_lang(lang), lang).run(text, sep=" ")
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/ghana.py
RENAMED
|
@@ -69,9 +69,12 @@ class GhanaG2PPhonemizer(BasePhonemizer):
|
|
|
69
69
|
self.allow_draft_rules = allow_draft_rules
|
|
70
70
|
self._cache: dict[str, object] = {}
|
|
71
71
|
|
|
72
|
-
def _engine(self, resolved_lang: str):
|
|
73
|
-
"""Return, lazily creating and caching, the engine for *resolved_lang*.
|
|
72
|
+
def _engine(self, resolved_lang: str, target_lang: str):
|
|
73
|
+
"""Return, lazily creating and caching, the engine for *resolved_lang*. A language on a draft africa-g2p
|
|
74
|
+
table is refused unless the instance was built with ``allow_draft_rules=True``."""
|
|
74
75
|
if resolved_lang not in self._cache:
|
|
76
|
+
if not self.allow_draft_rules:
|
|
77
|
+
refuse_draft(_rule_tables()[resolved_lang], target_lang, "ghana-g2p")
|
|
75
78
|
self._cache[resolved_lang] = _ghana_g2p().GhanaG2P(resolved_lang)
|
|
76
79
|
return self._cache[resolved_lang]
|
|
77
80
|
|
|
@@ -81,28 +84,26 @@ class GhanaG2PPhonemizer(BasePhonemizer):
|
|
|
81
84
|
return [code for code, table in _rule_tables().items()
|
|
82
85
|
if allow_draft_rules or draft_status(table) is None]
|
|
83
86
|
|
|
84
|
-
|
|
87
|
+
@classmethod
|
|
88
|
+
def get_lang(cls, target_lang: str) -> str:
|
|
85
89
|
"""
|
|
86
|
-
Resolve *target_lang* to a ghana-g2p ISO 639-3 code.
|
|
90
|
+
Resolve *target_lang* to a ghana-g2p ISO 639-3 code. A language on a
|
|
91
|
+
draft table resolves too: the instance refuses it at first use.
|
|
87
92
|
|
|
88
93
|
Only the primary subtag is matched, exactly (``twi-GH`` -> ``twi``).
|
|
89
94
|
ISO 639-1 tags are not mapped (``ee`` is not ``ewe``).
|
|
90
95
|
|
|
91
96
|
Raises:
|
|
92
|
-
UnsupportedLanguageError: If ghana-g2p has no such language
|
|
93
|
-
its africa-g2p table is a draft and the instance was not
|
|
94
|
-
built with ``allow_draft_rules=True``.
|
|
97
|
+
UnsupportedLanguageError: If ghana-g2p has no such language.
|
|
95
98
|
"""
|
|
96
99
|
key = _primary_subtag(target_lang)
|
|
97
100
|
tables = _rule_tables()
|
|
98
101
|
if key not in tables:
|
|
99
102
|
raise UnsupportedLanguageError(f"ghana-g2p: unsupported language {target_lang!r}")
|
|
100
|
-
if not self.allow_draft_rules:
|
|
101
|
-
refuse_draft(tables[key], target_lang, "ghana-g2p")
|
|
102
103
|
return key
|
|
103
104
|
|
|
104
105
|
def phonemize_string(self, text: str, lang: str) -> str:
|
|
105
|
-
engine = self._engine(self.get_lang(lang))
|
|
106
|
+
engine = self._engine(self.get_lang(lang), lang)
|
|
106
107
|
if self.alphabet == Alphabet.IPA:
|
|
107
108
|
return engine.ipa(text, sep=" ")
|
|
108
109
|
return engine.grapheme(text, sep=" ")
|
|
@@ -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 = 3
|
|
5
|
+
VERSION_ALPHA = 2
|
|
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.2a1 → scriptconv_nonfree-0.2.3a2/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.3a2
|
|
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
|
|
@@ -68,11 +68,11 @@ class TestAfricaG2PPhonemizer(unittest.TestCase):
|
|
|
68
68
|
|
|
69
69
|
def test_engine_is_cached_per_language(self):
|
|
70
70
|
p = AfricaG2PPhonemizer()
|
|
71
|
-
first = p._engine("yor")
|
|
72
|
-
self.assertIs(p._engine("yor"), first)
|
|
71
|
+
first = p._engine("yor", "yor")
|
|
72
|
+
self.assertIs(p._engine("yor", "yor"), first)
|
|
73
73
|
|
|
74
74
|
def test_the_engine_is_the_installed_africa_g2p(self):
|
|
75
|
-
engine = AfricaG2PPhonemizer()._engine("yor")
|
|
75
|
+
engine = AfricaG2PPhonemizer()._engine("yor", "yor")
|
|
76
76
|
self.assertIs(type(engine.g2p), africa_g2p.G2P)
|
|
77
77
|
|
|
78
78
|
def test_identity_names_the_africa_g2p_release(self):
|
|
@@ -116,11 +116,14 @@ class TestDraftTables(unittest.TestCase):
|
|
|
116
116
|
def test_a_draft_only_language_is_refused_by_default(self):
|
|
117
117
|
self.assertEqual(_confidence_by_table()["aab"], "llm-draft")
|
|
118
118
|
p = AfricaG2PPhonemizer()
|
|
119
|
+
self.assertEqual(AfricaG2PPhonemizer.get_lang("aab"), "aab")
|
|
119
120
|
with self.assertRaisesRegex(UnsupportedLanguageError, "'aab'.*'llm-draft'.*allow_draft_rules"):
|
|
120
|
-
p.get_lang("aab")
|
|
121
|
-
with self.assertRaisesRegex(UnsupportedLanguageError, "llm-draft"):
|
|
122
121
|
p.phonemize_string("aba", "aab")
|
|
123
122
|
|
|
123
|
+
def test_a_draft_refusal_names_the_caller_tag(self):
|
|
124
|
+
with self.assertRaisesRegex(UnsupportedLanguageError, "table 'aab' for 'aab-NG'"):
|
|
125
|
+
AfricaG2PPhonemizer().phonemize_string("aba", "aab-NG")
|
|
126
|
+
|
|
124
127
|
def test_a_draft_only_language_runs_with_the_flag(self):
|
|
125
128
|
p = AfricaG2PPhonemizer(allow_draft_rules=True)
|
|
126
129
|
expected = africa_g2p.AfricaPipeline(lang="aab", output="ipa").run("aba", sep=" ")
|
|
@@ -130,7 +133,7 @@ class TestDraftTables(unittest.TestCase):
|
|
|
130
133
|
def test_the_refusal_names_the_africa_g2p_release(self):
|
|
131
134
|
with self.assertRaisesRegex(UnsupportedLanguageError,
|
|
132
135
|
f"africa-g2p {metadata.version('africa-g2p')} "):
|
|
133
|
-
AfricaG2PPhonemizer().
|
|
136
|
+
AfricaG2PPhonemizer().phonemize_string("aba", "aab")
|
|
134
137
|
|
|
135
138
|
def test_the_corrected_charts_are_served_by_default(self):
|
|
136
139
|
# Dagbani, Ewe, Fante, Ga and Twi: Omniglot charts with corrections an
|
|
@@ -180,7 +183,7 @@ class TestRegionTables(unittest.TestCase):
|
|
|
180
183
|
# tables for Hausa stay under their region names.
|
|
181
184
|
self.assertEqual(_confidence_by_table()["hau"], "llm-draft")
|
|
182
185
|
with self.assertRaisesRegex(UnsupportedLanguageError, "'hau'.*'llm-draft'"):
|
|
183
|
-
AfricaG2PPhonemizer().
|
|
186
|
+
AfricaG2PPhonemizer().phonemize_string("a", "hau")
|
|
184
187
|
self.assertEqual(AfricaG2PPhonemizer(allow_draft_rules=True).get_lang("hau"), "hau")
|
|
185
188
|
self.assertEqual(AfricaG2PPhonemizer(allow_draft_rules=True).get_lang("hau-NG"), "hau")
|
|
186
189
|
|
|
@@ -247,7 +250,7 @@ def test_a_served_confidence_value_needs_no_flag(value, backend, lang):
|
|
|
247
250
|
def test_llm_draft_needs_the_flag(backend, lang):
|
|
248
251
|
with _with_confidence("llm-draft"):
|
|
249
252
|
with pytest.raises(UnsupportedLanguageError, match="'llm-draft'.*allow_draft_rules"):
|
|
250
|
-
backend().
|
|
253
|
+
backend().phonemize_string("a", lang)
|
|
251
254
|
assert backend(allow_draft_rules=True).get_lang(lang) == lang
|
|
252
255
|
|
|
253
256
|
|
|
@@ -255,7 +258,7 @@ def test_llm_draft_needs_the_flag(backend, lang):
|
|
|
255
258
|
def test_a_confidence_value_nobody_listed_needs_the_flag(backend, lang):
|
|
256
259
|
with _with_confidence("native-reviewed"):
|
|
257
260
|
with pytest.raises(UnsupportedLanguageError, match="'native-reviewed'"):
|
|
258
|
-
backend().
|
|
261
|
+
backend().phonemize_string("a", lang)
|
|
259
262
|
assert backend(allow_draft_rules=True).get_lang(lang) == lang
|
|
260
263
|
|
|
261
264
|
|
|
@@ -66,8 +66,8 @@ class TestGhanaG2PPhonemizer(unittest.TestCase):
|
|
|
66
66
|
|
|
67
67
|
def test_engine_is_cached_per_language(self):
|
|
68
68
|
p = GhanaG2PPhonemizer()
|
|
69
|
-
first = p._engine("twi")
|
|
70
|
-
self.assertIs(p._engine("twi"), first)
|
|
69
|
+
first = p._engine("twi", "twi")
|
|
70
|
+
self.assertIs(p._engine("twi", "twi"), first)
|
|
71
71
|
|
|
72
72
|
def test_rejects_unsupported_alphabet(self):
|
|
73
73
|
with self.assertRaises(ValueError):
|
|
@@ -81,7 +81,7 @@ class TestOneAfricaG2P(unittest.TestCase):
|
|
|
81
81
|
def test_both_backends_read_one_africa_g2p(self):
|
|
82
82
|
# ghana-g2p imports africa_g2p.G2P; the africa backend must run the
|
|
83
83
|
# same class from the same installed distribution.
|
|
84
|
-
engine = AfricaG2PPhonemizer()._engine("yor")
|
|
84
|
+
engine = AfricaG2PPhonemizer()._engine("yor", "yor")
|
|
85
85
|
self.assertIs(type(engine.g2p), ghana_g2p.core.G2P)
|
|
86
86
|
loaded_by_ghana = sys.modules[ghana_g2p.core.G2P.__module__.partition(".")[0]]
|
|
87
87
|
self.assertEqual(AfricaG2PPhonemizer().identity("yor").version,
|
|
@@ -105,7 +105,16 @@ class TestDraftTables(unittest.TestCase):
|
|
|
105
105
|
self.assertRaisesRegex(UnsupportedLanguageError,
|
|
106
106
|
"ghana-g2p: .*table 'gaa' for 'ada'.*'llm-draft'.*allow_draft_rules"):
|
|
107
107
|
# Adangme borrows the Ga table.
|
|
108
|
-
GhanaG2PPhonemizer().
|
|
108
|
+
GhanaG2PPhonemizer().phonemize_string("a", "ada")
|
|
109
|
+
|
|
110
|
+
def test_a_draft_refusal_names_the_caller_tag(self):
|
|
111
|
+
with mock.patch.object(africa_g2p.loader, "load_rules",
|
|
112
|
+
return_value={"confidence": "llm-draft"}), \
|
|
113
|
+
self.assertRaisesRegex(UnsupportedLanguageError, "table 'gaa' for 'ada-GH'"):
|
|
114
|
+
GhanaG2PPhonemizer().phonemize_string("a", "ada-GH")
|
|
115
|
+
|
|
116
|
+
def test_get_lang_answers_on_the_class(self):
|
|
117
|
+
self.assertEqual(GhanaG2PPhonemizer.get_lang("twi-GH"), "twi")
|
|
109
118
|
|
|
110
119
|
|
|
111
120
|
if __name__ == "__main__":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/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
|
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/ar.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree/phonemizers/vi.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree.egg-info/requires.txt
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/scriptconv_nonfree.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_match_lang_direction.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_halabi_iqra.py
RENAMED
|
File without changes
|
{scriptconv_nonfree-0.2.2a1 → scriptconv_nonfree-0.2.3a2}/tests/test_phonemizers_identity.py
RENAMED
|
File without changes
|
|
File without changes
|