scriptconv 0.0.3a18__tar.gz → 0.0.3a19__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-0.0.3a18 → scriptconv-0.0.3a19}/PKG-INFO +1 -1
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/notation.py +20 -6
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/version.py +1 -1
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv.egg-info/PKG-INFO +1 -1
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_notation.py +14 -1
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/LICENSE +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/README.md +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/pyproject.toml +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/requirements.txt +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/__init__.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/__main__.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/cangjie.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/conventions.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/data/__init__.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/data/cangjie5_tc.tsv.gz +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/graph.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/__init__.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/__init__.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/bw2ipa.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/hangul2ipa.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/aspiration.csv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/assimilation.csv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/double_coda.csv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/hanja.tsv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/ipa.csv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/neutralization.csv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/tensification.csv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/yale.csv +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/__init__.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/codeswitch.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/diacritize.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/dialectal.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/english_g2p.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/espeak.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/frontend.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/levantine_g2p.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/normalize.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/phoneme_inventory.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/zh_num.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/ar.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/base.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/en.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/enums.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/eu.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/fa.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/gl.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/he.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/ja.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/ko.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/mul.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/mwl.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/o2ipa.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/pt.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/registry.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/shami.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/vi.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/zh.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/py.typed +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/readings.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/scripts.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/translit.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv.egg-info/SOURCES.txt +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv.egg-info/dependency_links.txt +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv.egg-info/requires.txt +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv.egg-info/top_level.txt +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/setup.cfg +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_arpa_stress.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_cangjie.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_cli.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_conventions.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_errors_policy.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_examples.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_graph.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_phonemizers_base.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_phonemizers_cjk_ar.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_readings.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_readings_zh.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_scripts.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_scripts_stressonnx_compat.py +0 -0
- {scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/tests/test_translit.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptconv
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3a19
|
|
4
4
|
Summary: Zero-dependency script & phoneme-notation core — ISO-15924 detection & metadata, IPA↔ARPABET/X-SAMPA/Lexique/Kirshenbaum/Cotovía/RFE, Buckwalter↔Arabic, Hangul→jamo, kana
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/TigreGotico/scriptconv
|
|
@@ -1034,7 +1034,8 @@ _MANTOQ_VOWELS: dict[str, str] = {
|
|
|
1034
1034
|
"u": "u", "uu": "uː",
|
|
1035
1035
|
}
|
|
1036
1036
|
|
|
1037
|
-
_MANTOQ_MULTI = ("_dbl_", "_+_", "
|
|
1037
|
+
_MANTOQ_MULTI = ("_dbl_", "_+_", "_sil_", "_eos_", "_pad_",
|
|
1038
|
+
"aaaa", "aa", "ii", "uu")
|
|
1038
1039
|
|
|
1039
1040
|
|
|
1040
1041
|
def _tokenize_mantoq(text: str) -> list[str]:
|
|
@@ -1065,16 +1066,29 @@ def mantoq_to_ipa(mantoq: str, errors: str = "pass") -> str:
|
|
|
1065
1066
|
's a l aː m'
|
|
1066
1067
|
>>> mantoq_to_ipa("b_dbl_a")
|
|
1067
1068
|
'bːa'
|
|
1069
|
+
|
|
1070
|
+
The inventory's special tokens are honoured: ``_sil_`` becomes a space,
|
|
1071
|
+
``_eos_``/``_pad_`` are dropped.
|
|
1068
1072
|
"""
|
|
1069
1073
|
out: list[str] = []
|
|
1070
1074
|
last_tok = None
|
|
1071
1075
|
for pos, tok in enumerate(_tokenize_mantoq(mantoq)):
|
|
1072
1076
|
if tok == "_dbl_":
|
|
1073
|
-
#
|
|
1074
|
-
#
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1077
|
+
# upstream emits _dbl_ only by splitting a doubled CONSONANT
|
|
1078
|
+
# (mantoq buck/tokenization.py: `phon not in vowels and
|
|
1079
|
+
# phon[0] == phon[1]`); geminate it with a length mark. A
|
|
1080
|
+
# vowel+_dbl_ sequence does not occur in genuine mantoq output
|
|
1081
|
+
# and is left unchanged.
|
|
1082
|
+
if out and last_tok in _MANTOQ_CONSONANTS \
|
|
1083
|
+
and not out[-1].endswith("ː"):
|
|
1084
|
+
out[-1] += "ː"
|
|
1085
|
+
continue
|
|
1086
|
+
if tok == "_sil_":
|
|
1087
|
+
out.append(" ")
|
|
1088
|
+
last_tok = None
|
|
1089
|
+
continue
|
|
1090
|
+
if tok in ("_eos_", "_pad_"):
|
|
1091
|
+
last_tok = None
|
|
1078
1092
|
continue
|
|
1079
1093
|
if tok == "_+_":
|
|
1080
1094
|
out.append(" ")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptconv
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3a19
|
|
4
4
|
Summary: Zero-dependency script & phoneme-notation core — ISO-15924 detection & metadata, IPA↔ARPABET/X-SAMPA/Lexique/Kirshenbaum/Cotovía/RFE, Buckwalter↔Arabic, Hangul→jamo, kana
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/TigreGotico/scriptconv
|
|
@@ -1168,7 +1168,20 @@ def test_mantoq_theta_is_caret_not_shadda():
|
|
|
1168
1168
|
|
|
1169
1169
|
def test_mantoq_gemination_marker():
|
|
1170
1170
|
assert mantoq_to_ipa("b_dbl_a") == "bːa"
|
|
1171
|
-
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
def test_mantoq_dbl_after_vowel_is_inert():
|
|
1174
|
+
# upstream only emits _dbl_ after consonants (tokenization.py splits
|
|
1175
|
+
# doubled consonant phonemes); a vowel+_dbl_ input is left unchanged
|
|
1176
|
+
assert mantoq_to_ipa("aa_dbl_") == "aː"
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
def test_mantoq_special_tokens():
|
|
1180
|
+
# inventory special tokens: _sil_ -> pause (space), _eos_/_pad_ dropped —
|
|
1181
|
+
# and never shredded into letter phonemes
|
|
1182
|
+
assert mantoq_to_ipa("m_sil_n") == "m n"
|
|
1183
|
+
assert mantoq_to_ipa("m a_eos_") == "m a"
|
|
1184
|
+
assert mantoq_to_ipa("_pad_b") == "b"
|
|
1172
1185
|
|
|
1173
1186
|
|
|
1174
1187
|
def test_mantoq_word_separator_and_glottal():
|
|
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-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/hangul2ipa.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/hanja.tsv
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/ipa.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/ko_tables/yale.csv
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/__init__.py
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/codeswitch.py
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/diacritize.py
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/dialectal.py
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/english_g2p.py
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/espeak.py
RENAMED
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/frontend.py
RENAMED
|
File without changes
|
|
File without changes
|
{scriptconv-0.0.3a18 → scriptconv-0.0.3a19}/scriptconv/phonemizers/_thirdparty/shami/normalize.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
|
|
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
|
|
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
|