polyg2p 0.1.0__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.
- polyg2p-0.1.0/.github/smoke/.gitattributes +1 -0
- polyg2p-0.1.0/.github/smoke/expected-nodata.tsv +37 -0
- polyg2p-0.1.0/.github/smoke/expected-pubdata.tsv +37 -0
- polyg2p-0.1.0/.github/smoke/run.sh +23 -0
- polyg2p-0.1.0/.github/smoke/smoke.py +37 -0
- polyg2p-0.1.0/.github/workflows/wheels.yml +198 -0
- polyg2p-0.1.0/.gitignore +15 -0
- polyg2p-0.1.0/Cargo.lock +689 -0
- polyg2p-0.1.0/Cargo.toml +25 -0
- polyg2p-0.1.0/LICENSE +201 -0
- polyg2p-0.1.0/NOTICE +40 -0
- polyg2p-0.1.0/PKG-INFO +10 -0
- polyg2p-0.1.0/README.md +334 -0
- polyg2p-0.1.0/bindings/python/Cargo.lock +287 -0
- polyg2p-0.1.0/bindings/python/Cargo.toml +19 -0
- polyg2p-0.1.0/bindings/python/src/lib.rs +47 -0
- polyg2p-0.1.0/bluetts-polyg2p.patch +285 -0
- polyg2p-0.1.0/data/ca_open.tsv +2313 -0
- polyg2p-0.1.0/data/de_func.tsv +140 -0
- polyg2p-0.1.0/data/en_func.tsv +106 -0
- polyg2p-0.1.0/data/en_merge.tsv +25 -0
- polyg2p-0.1.0/data/he_fixture.tsv +301 -0
- polyg2p-0.1.0/data/it_open.tsv +1526 -0
- polyg2p-0.1.0/data/it_suffix.tsv +3165 -0
- polyg2p-0.1.0/data/nl_eren.tsv +148 -0
- polyg2p-0.1.0/data/pt_open.tsv +7975 -0
- polyg2p-0.1.0/data/ru-ctx.g2p +0 -0
- polyg2p-0.1.0/data/uk_stem.tsv +5132 -0
- polyg2p-0.1.0/data/uk_suffix.tsv +2224 -0
- polyg2p-0.1.0/docs/adding-a-language.md +61 -0
- polyg2p-0.1.0/docs/hebrew.md +112 -0
- polyg2p-0.1.0/docs/results/ca.md +141 -0
- polyg2p-0.1.0/docs/results/cs.md +110 -0
- polyg2p-0.1.0/docs/results/el.md +101 -0
- polyg2p-0.1.0/docs/results/en.md +29 -0
- polyg2p-0.1.0/docs/results/fi.md +131 -0
- polyg2p-0.1.0/docs/results/fr.md +94 -0
- polyg2p-0.1.0/docs/results/he.md +92 -0
- polyg2p-0.1.0/docs/results/hu.md +119 -0
- polyg2p-0.1.0/docs/results/id.md +103 -0
- polyg2p-0.1.0/docs/results/nl.md +101 -0
- polyg2p-0.1.0/docs/results/pl.md +98 -0
- polyg2p-0.1.0/docs/results/pt.md +124 -0
- polyg2p-0.1.0/docs/results/ro.md +115 -0
- polyg2p-0.1.0/docs/results/sv.md +130 -0
- polyg2p-0.1.0/docs/results/tr.md +79 -0
- polyg2p-0.1.0/docs/results/uk.md +134 -0
- polyg2p-0.1.0/pyproject.toml +21 -0
- polyg2p-0.1.0/python/polyg2p/__init__.py +169 -0
- polyg2p-0.1.0/python/polyg2p/bluetts.py +32 -0
- polyg2p-0.1.0/python/polyg2p/vocab.py +16 -0
- polyg2p-0.1.0/src/ar.rs +30 -0
- polyg2p-0.1.0/src/bin/build_lex.rs +29 -0
- polyg2p-0.1.0/src/bin/g2p.rs +39 -0
- polyg2p-0.1.0/src/bin/he_check.rs +30 -0
- polyg2p-0.1.0/src/bin/nn_check.rs +10 -0
- polyg2p-0.1.0/src/bin/ru_check.rs +97 -0
- polyg2p-0.1.0/src/ca.rs +1296 -0
- polyg2p-0.1.0/src/cs.rs +1031 -0
- polyg2p-0.1.0/src/de.rs +1368 -0
- polyg2p-0.1.0/src/el.rs +928 -0
- polyg2p-0.1.0/src/en.rs +504 -0
- polyg2p-0.1.0/src/es.rs +500 -0
- polyg2p-0.1.0/src/fi.rs +1605 -0
- polyg2p-0.1.0/src/fold.rs +63 -0
- polyg2p-0.1.0/src/fr.rs +2402 -0
- polyg2p-0.1.0/src/he/num.rs +587 -0
- polyg2p-0.1.0/src/he.rs +465 -0
- polyg2p-0.1.0/src/hu.rs +807 -0
- polyg2p-0.1.0/src/id.rs +870 -0
- polyg2p-0.1.0/src/it.rs +1307 -0
- polyg2p-0.1.0/src/lexicon.rs +156 -0
- polyg2p-0.1.0/src/lib.rs +547 -0
- polyg2p-0.1.0/src/nl.rs +1498 -0
- polyg2p-0.1.0/src/nn.rs +379 -0
- polyg2p-0.1.0/src/norm.rs +236 -0
- polyg2p-0.1.0/src/num.rs +678 -0
- polyg2p-0.1.0/src/pl.rs +970 -0
- polyg2p-0.1.0/src/pt.rs +992 -0
- polyg2p-0.1.0/src/ro.rs +1099 -0
- polyg2p-0.1.0/src/ru.rs +2080 -0
- polyg2p-0.1.0/src/spell.rs +104 -0
- polyg2p-0.1.0/src/sv.rs +1454 -0
- polyg2p-0.1.0/src/tagger.rs +668 -0
- polyg2p-0.1.0/src/text.rs +128 -0
- polyg2p-0.1.0/src/tr.rs +647 -0
- polyg2p-0.1.0/src/uk.rs +873 -0
- polyg2p-0.1.0/tests/he_render.rs +34 -0
- polyg2p-0.1.0/tools/build_data.py +221 -0
- polyg2p-0.1.0/tools/ca_gold.py +112 -0
- polyg2p-0.1.0/tools/ca_open.py +94 -0
- polyg2p-0.1.0/tools/cmp_ours.py +14 -0
- polyg2p-0.1.0/tools/collapse_ca.py +25 -0
- polyg2p-0.1.0/tools/collapse_cs.py +24 -0
- polyg2p-0.1.0/tools/collapse_el.py +31 -0
- polyg2p-0.1.0/tools/collapse_fi.py +21 -0
- polyg2p-0.1.0/tools/collapse_fr.py +48 -0
- polyg2p-0.1.0/tools/collapse_hu.py +43 -0
- polyg2p-0.1.0/tools/collapse_id.py +39 -0
- polyg2p-0.1.0/tools/collapse_nl.py +41 -0
- polyg2p-0.1.0/tools/collapse_pl.py +29 -0
- polyg2p-0.1.0/tools/collapse_pt.py +39 -0
- polyg2p-0.1.0/tools/collapse_ro.py +39 -0
- polyg2p-0.1.0/tools/collapse_ru.py +36 -0
- polyg2p-0.1.0/tools/collapse_sv.py +45 -0
- polyg2p-0.1.0/tools/collapse_tr.py +41 -0
- polyg2p-0.1.0/tools/collapse_uk.py +83 -0
- polyg2p-0.1.0/tools/de_convert.py +54 -0
- polyg2p-0.1.0/tools/diffstat.py +15 -0
- polyg2p-0.1.0/tools/en_convert.py +275 -0
- polyg2p-0.1.0/tools/en_diff.py +36 -0
- polyg2p-0.1.0/tools/en_fix.tsv +55 -0
- polyg2p-0.1.0/tools/en_reduced.py +48 -0
- polyg2p-0.1.0/tools/espeak_words.py +21 -0
- polyg2p-0.1.0/tools/eval_acc.py +224 -0
- polyg2p-0.1.0/tools/eval_oov.py +37 -0
- polyg2p-0.1.0/tools/fr_espeak_ref.py +16 -0
- polyg2p-0.1.0/tools/fr_espeak_say.py +12 -0
- polyg2p-0.1.0/tools/he_distill.py +223 -0
- polyg2p-0.1.0/tools/he_eval.py +137 -0
- polyg2p-0.1.0/tools/he_parity.py +89 -0
- polyg2p-0.1.0/tools/homographs.py +84 -0
- polyg2p-0.1.0/tools/hu_err.py +42 -0
- polyg2p-0.1.0/tools/it_open.py +37 -0
- polyg2p-0.1.0/tools/it_stress.py +155 -0
- polyg2p-0.1.0/tools/it_stress_eval.py +88 -0
- polyg2p-0.1.0/tools/nl_build_lex.py +78 -0
- polyg2p-0.1.0/tools/nl_eren.py +32 -0
- polyg2p-0.1.0/tools/pl_err.py +33 -0
- polyg2p-0.1.0/tools/pl_espeak.py +22 -0
- polyg2p-0.1.0/tools/pt_build_lex.py +83 -0
- polyg2p-0.1.0/tools/pt_open.py +171 -0
- polyg2p-0.1.0/tools/ro_cmp_espeak.py +79 -0
- polyg2p-0.1.0/tools/ro_espeak_top.py +23 -0
- polyg2p-0.1.0/tools/ru_build_lex.py +86 -0
- polyg2p-0.1.0/tools/ru_distill.py +155 -0
- polyg2p-0.1.0/tools/ru_parity.py +448 -0
- polyg2p-0.1.0/tools/sentence_cmp.py +82 -0
- polyg2p-0.1.0/tools/speed.py +32 -0
- polyg2p-0.1.0/tools/sv_lex.py +80 -0
- polyg2p-0.1.0/tools/train_g2p.py +270 -0
- polyg2p-0.1.0/tools/train_he.py +399 -0
- polyg2p-0.1.0/tools/train_ru.py +296 -0
- polyg2p-0.1.0/tools/uk_eval.py +22 -0
- polyg2p-0.1.0/tools/uk_stress.py +185 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* -text
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# polyg2p 0.1.0 output, nodata (made with the macosx_11_0_arm64 release wheel)
|
|
2
|
+
en I have read the record. aɪ hæv ɹˈɛd ðɪ ˌɑːɹˌiːsˌiːˌoʊˌɑːɹdˈiː.
|
|
3
|
+
en Please record the lecture so we can replay it later. pˌiːˌɛlˌiːˌeɪˌɛsˈiː ˌɑːɹˌiːsˌiːˌoʊˌɑːɹdˈiː ðɪ ˌɛlˌiːsˌiːtˌiːjˌuːˌɑːɹˈiː sˌoʊ wiː kæn ˌɑːɹˌiːpˌiːˌɛlˌeɪwˈaɪ ɪt ˌɛlˌeɪtˌiːˌiːˈɑːɹ.
|
|
4
|
+
en The wind was too strong to wind the clock. ðə dˌʌbəljuːˌaɪˌɛndˈiː wʌz tˌiːˌoʊˈoʊ ˌɛstˌiːˌɑːɹˌoʊˌɛnʤˈiː tə dˌʌbəljuːˌaɪˌɛndˈiː ðə sˌiːˌɛlˌoʊsˌiːkˈeɪ.
|
|
5
|
+
en She will lead the team; lead is a heavy metal. ʃiː wɪl ˌɛlˌiːˌeɪdˈiː ðə tˌiːˌiːˌeɪˈɛm; ˌɛlˌiːˌeɪdˈiː ɪz ɐ ˌeɪʧˌiːˌeɪvˌiːwˈaɪ ˌɛmˌiːtˌiːˌeɪˈɛl.
|
|
6
|
+
en Dr. Smith lives at 221B Baker St. and earns $3,450.75 a year. dˌiːˈɑːɹ. ˌɛsˌɛmˌaɪtˌiːˈeɪʧ ˌɛlˌaɪvˌiːˌiːˈɛs æt tˌiːdˌʌbəljuːˈoʊ ˌeɪʧjˌuːˌɛndˌiːˌɑːɹˌiːdˈiː tˌiːdˌʌbəljuːˌiːˌɛntˌiːwˈaɪ ˌoʊˌɛnˈiː bˈiː bˌiːˌeɪkˌeɪˌiːˈɑːɹ ˌɛstˌiːˌɑːɹˌiːˌiːtˈiː ænd ˌiːˌeɪˌɑːɹˌɛnˈɛs tˌiːˌeɪʧˌɑːɹˌiːˈiː tˌiːˌeɪʧˌoʊjˌuːˌɛsˌeɪˌɛndˈiː ˌɛfˌoʊjˌuːˈɑːɹ ˌeɪʧjˌuːˌɛndˌiːˌɑːɹˌiːdˈiː ˌɛfˌaɪˌɛftˌiːwˈaɪ dˌiːˌoʊˌɛlˌɛlˌeɪˌɑːɹˈɛs ænd ˌɛsˌiːvˌiːˌiːˌɛntˌiːwˈaɪ ˌɛfˌaɪvˌiːˈiː sˌiːˌiːˌɛntˌiːˈɛs ɐ wˌaɪˌiːˌeɪˈɑːɹ.
|
|
7
|
+
en On 12/05/2024 at 3:45 p.m., 42% of the 1,000 votes were counted. ˌɔn dˌiːˌiːsˌiːˌiːˌɛmbˌiːˌiːˈɑːɹ ˌɛfˌaɪˌɛftˌiːˈeɪʧ tˌiːdˌʌbəljuːˌiːˌɛntˌiːwˈaɪ tˌiːdˌʌbəljuːˌiːˌɛntˌiːwˈaɪ ˌɛfˌoʊjˌuːˈɑːɹ æt tˌiːˌeɪʧˌɑːɹˌiːˈiː ˌɛfˌoʊˌɑːɹtˌiːwˈaɪ ˌɛfˌaɪvˌiːˈiː pˈiː. ˈɛm., ˌɛfˌoʊˌɑːɹtˌiːwˈaɪ tˌiːdˌʌbəljuːˈoʊ pˌiːˌiːˌɑːɹsˌiːˌiːˌɛntˈiː ʌvðə ˌoʊˌɛnˈiː tˌiːˌeɪʧˌoʊjˌuːˌɛsˌeɪˌɛndˈiː vˌiːˌoʊtˌiːˌiːˈɛs wɜː sˌiːˌoʊjˌuːˌɛntˌiːˌiːdˈiː.
|
|
8
|
+
de Guten Tag, wie geht es Ihnen? ɡˈuːtən tˈɑːk, viː ɡˈeːt ɛs ˌiːnən?
|
|
9
|
+
de Der Zug nach München fährt um 14:30 Uhr ab. dɛɾ tsˈuːk nɑːx mˈʏnçən fˈɛːrt ʊm fˈiːɾtsən ˈuːɾ dɾˈaɪsɪç ap.
|
|
10
|
+
de Ich habe 1.234 Euro und 56 Cent auf dem Konto. ɪç hɑːbə ˈaɪntˌaʊzəntsvˌaɪhˌʊndɜtfˌiːɾʊntdɾˌaɪsɪç ˈɔøroː ʊnt zˈɛksʊntfˌʏnftsɪç tsˈɛnt aʊf deːm kˈɔntoː.
|
|
11
|
+
de Die Straßenbahnhaltestelle liegt gegenüber dem Rathaus. diː ʃtɾasɛnbɑːnhaltɛstˈɛlə lˈiːkt ɡeːɡənˈyːbɜ deːm rˈataʊs.
|
|
12
|
+
de Er sucht die Sucht nicht, aber die Sucht sucht ihn. ɛɾ zˈuːxt diː zˈʊxt nˈɪçt, ˌɑːbɜ diː zˈʊxt zˈuːxt iːn.
|
|
13
|
+
de Donaudampfschifffahrtsgesellschaftskapitän ist ein langes Wort. dˈoːnaʊdampfʃɪffɑːrtsɡəzəlʃaftskapiːtɛn ɪst aɪn lˈaŋəs vˈɔɾt.
|
|
14
|
+
es Hola, ¿cómo estás? ˈola, kˈomo estˈas?
|
|
15
|
+
es-419 Hola, ¿cómo estás? ˈola, kˈomo estˈas?
|
|
16
|
+
es El 25 de diciembre de 2023 celebramos la Navidad. el βˌeɪntiθˈinko ðe ðiθjˈembɾe ðe ðˈos mˈil βˌeɪntitɾˈes θˌeleβɾˈamos la nˌaβiðˈad.
|
|
17
|
+
es-419 El 25 de diciembre de 2023 celebramos la Navidad. el βˌeɪntisˈinko ðe ðisjˈembɾe ðe ðˈos mˈil βˌeɪntitɾˈes sˌeleβɾˈamos la nˌaβiðˈad.
|
|
18
|
+
es ¡Qué bonito día hace hoy en Madrid! kˈe βonˈito ðˈia ˈaθe ˈoɪ en maðɾˈid!
|
|
19
|
+
es-419 ¡Qué bonito día hace hoy en Madrid! kˈe βonˈito ðˈia ˈase ˈoɪ en maðɾˈid!
|
|
20
|
+
es La calle y la cena están cerca de la plaza. la kˈaʎe i la θˈena estˈan θˈeɾka ðe la plˈaθa.
|
|
21
|
+
es-419 La calle y la cena están cerca de la plaza. la kˈajje i la sˈena estˈan sˈeɾka ðe la plˈasa.
|
|
22
|
+
es El señor García pagó 1.500,50 euros por el coche. el seɲˈoɾ ɣaɾθˈia paɣˈo mˈil kinjˈɛntos kˈoma θinkwˈɛnta ˈeʊɾos poɾ el kˈoʧe.
|
|
23
|
+
es-419 El señor García pagó 1.500,50 euros por el coche. el seɲˈoɾ ɣaɾsˈia paɣˈo mˈil kinjˈɛntos kˈoma sinkwˈɛnta ˈeʊɾos poɾ el kˈoʧe.
|
|
24
|
+
es Llueve mucho en Galicia durante el invierno. ʎwˈeβe mˈuʧo eŋ ɡalˈiθja ðuɾˈante el imbjˈeɾno.
|
|
25
|
+
es-419 Llueve mucho en Galicia durante el invierno. ʝwˈeβe mˈuʧo eŋ ɡalˈisja ðuɾˈante el imbjˈeɾno.
|
|
26
|
+
it Buongiorno a tutti! bwɔnʤˈorno a tˈutːɪ!
|
|
27
|
+
it Il treno per Roma parte alle 15:45 dal binario 3. il trˈɛno per rˈoma pˈarte ˌalle kwˈindiʧɪ e kwarantaʧˈinkwe dal binˈario trˈe.
|
|
28
|
+
it Ho comprato 12 uova e 2 chili di pane per 7,50 euro. ˈɔ komprˈato dˈɔdiʧɪ wˈɔva e dˈue kˈilɪ dɪ pˈane per sˈɛtːe vˈirɡola ʧinkwˈanta ˈɛuro.
|
|
29
|
+
it Gli gnocchi della nonna sono squisiti. ʎɪ ɲˈɔkːɪ dˌella nˈɔnna sˈono skwizˈitɪ.
|
|
30
|
+
it Perché sei arrivato così tardi ieri sera? perkˈe sˈɛi arɾivˈato kozˈi tˈardɪ jˈerɪ sˈera?
|
|
31
|
+
it La città di Firenze è famosa per l'arte rinascimentale. la ʧitːˈa dɪ firˈɛntse ɛ famˈoza per lˈarte rinaʃimentˈale.
|
|
32
|
+
ru Привет, как у тебя дела? prʲˈivʲɪt, kak u tʲˈebʲə dʲˈeɫə?
|
|
33
|
+
ru Замок на двери старого замка был сломан. zˈamək nˈa dvʲˈerʲɪ stɐrˈovə zˈamkə bɨɫ sɫˈomən.
|
|
34
|
+
ru В 2024 году мы поехали в Санкт-Петербург. v dvʲe tɨsʲˈæʧɪ dvˈaʦːɨtʲ ʧɪtvʲˈɵrtəm ɡˈodʊ mɨ pəjɪxˈalʲɪ v sankt pʲɪtʲˈerbʊrk.
|
|
35
|
+
ru Я купил 3 килограмма яблок за 250 рублей. ja kˈupʲɪɫ trʲi kʲɪɫɐɡrˈamːə ˈjabɫək za dvʲˈesʲtʲɪ pʲɪdʲˈesʲɪt rˈublʲɪj.
|
|
36
|
+
ru Мама мыла раму, а папа читал газету. mˈamə mˈɨɫə rˈamʊ, ˈa pˈapə ʧˈitəɫ ɡɐzʲˈetʊ.
|
|
37
|
+
ru Все пришли, и всё было хорошо. fsʲe prʲˈiʂlʲɪ, i fsʲˈɵ bˈɨɫə xɐrˈoʂə.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# polyg2p 0.1.0 output, pubdata (made with the macosx_11_0_arm64 release wheel)
|
|
2
|
+
en I have read the record. aɪ hæv ɹˈɛd ðə ɹˈɛkɚd.
|
|
3
|
+
en Please record the lecture so we can replay it later. plˈiːz ɹᵻkˈɔːɹd ðə lˈɛkʧɚ sˌoʊ wiː kæn ɹᵻplˈeɪ ɪt lˈeɪɾɚ.
|
|
4
|
+
en The wind was too strong to wind the clock. ðə wˈɪnd wʌz tˈuː stɹˈɔːŋ tə wˈaɪnd ðə klˈɑːk.
|
|
5
|
+
en She will lead the team; lead is a heavy metal. ʃiː wɪl lˈiːd ðə tˈiːm; lˈiːd ɪz ɐ hˈɛvi mˈɛɾəl.
|
|
6
|
+
en Dr. Smith lives at 221B Baker St. and earns $3,450.75 a year. dˈɑːktɚ smˈɪθ lˈɪvz æt tˈuː hˈʌndɹəd twˈɛnti wˈʌn bˈiː bˈeɪkɚ stɹˈiːt ænd ˈɜːnz θɹˈiː θˈaʊzənd fˈɔːɹ hˈʌndɹəd fˈɪfti dˈɑːlɚz ænd sˈɛvənti fˈaɪv sˈɛnʦ ɐ jˈɪɹ.
|
|
7
|
+
en On 12/05/2024 at 3:45 p.m., 42% of the 1,000 votes were counted. ˌɔn dᵻsˈɛmbɚ fˈɪfθ twˈɛnti twˈɛnti fˈɔːɹ æt θɹˈiː fˈɔːɹɾi fˈaɪv pˈiː. ˈɛm., fˈɔːɹɾi tˈuː pɚsˈɛnt ʌvðə wˈʌn θˈaʊzənd vˈoʊʦ wɜː kˈaʊntᵻd.
|
|
8
|
+
de Guten Tag, wie geht es Ihnen? ɡˈuːtən tˈɑːk, viː ɡˈeːt ɛs ˌiːnən?
|
|
9
|
+
de Der Zug nach München fährt um 14:30 Uhr ab. dɛɾ tsˈuːk nɑːx mˈʏnçən fˈɛːrt ʊm fˈiːɾtsən ˈuːɾ dɾˈaɪsɪç ap.
|
|
10
|
+
de Ich habe 1.234 Euro und 56 Cent auf dem Konto. ɪç hɑːbə ˈaɪntˌaʊzəntsvˌaɪhˌʊndɜtfˌiːɾʊntdɾˌaɪsɪç ˈɔøroː ʊnt zˈɛksʊntfˌʏnftsɪç tsˈɛnt aʊf deːm kˈɔntoː.
|
|
11
|
+
de Die Straßenbahnhaltestelle liegt gegenüber dem Rathaus. diː ʃtɾasɛnbɑːnhaltɛstˈɛlə lˈiːkt ɡeːɡənˈyːbɜ deːm rˈataʊs.
|
|
12
|
+
de Er sucht die Sucht nicht, aber die Sucht sucht ihn. ɛɾ zˈuːxt diː zˈʊxt nˈɪçt, ˌɑːbɜ diː zˈʊxt zˈuːxt iːn.
|
|
13
|
+
de Donaudampfschifffahrtsgesellschaftskapitän ist ein langes Wort. dˈoːnaʊdampfʃɪffɑːrtsɡəzəlʃaftskapiːtɛn ɪst aɪn lˈaŋəs vˈɔɾt.
|
|
14
|
+
es Hola, ¿cómo estás? ˈola, kˈomo estˈas?
|
|
15
|
+
es-419 Hola, ¿cómo estás? ˈola, kˈomo estˈas?
|
|
16
|
+
es El 25 de diciembre de 2023 celebramos la Navidad. el βˌeɪntiθˈinko ðe ðiθjˈembɾe ðe ðˈos mˈil βˌeɪntitɾˈes θˌeleβɾˈamos la nˌaβiðˈad.
|
|
17
|
+
es-419 El 25 de diciembre de 2023 celebramos la Navidad. el βˌeɪntisˈinko ðe ðisjˈembɾe ðe ðˈos mˈil βˌeɪntitɾˈes sˌeleβɾˈamos la nˌaβiðˈad.
|
|
18
|
+
es ¡Qué bonito día hace hoy en Madrid! kˈe βonˈito ðˈia ˈaθe ˈoɪ en maðɾˈid!
|
|
19
|
+
es-419 ¡Qué bonito día hace hoy en Madrid! kˈe βonˈito ðˈia ˈase ˈoɪ en maðɾˈid!
|
|
20
|
+
es La calle y la cena están cerca de la plaza. la kˈaʎe i la θˈena estˈan θˈeɾka ðe la plˈaθa.
|
|
21
|
+
es-419 La calle y la cena están cerca de la plaza. la kˈajje i la sˈena estˈan sˈeɾka ðe la plˈasa.
|
|
22
|
+
es El señor García pagó 1.500,50 euros por el coche. el seɲˈoɾ ɣaɾθˈia paɣˈo mˈil kinjˈɛntos kˈoma θinkwˈɛnta ˈeʊɾos poɾ el kˈoʧe.
|
|
23
|
+
es-419 El señor García pagó 1.500,50 euros por el coche. el seɲˈoɾ ɣaɾsˈia paɣˈo mˈil kinjˈɛntos kˈoma sinkwˈɛnta ˈeʊɾos poɾ el kˈoʧe.
|
|
24
|
+
es Llueve mucho en Galicia durante el invierno. ʎwˈeβe mˈuʧo eŋ ɡalˈiθja ðuɾˈante el imbjˈeɾno.
|
|
25
|
+
es-419 Llueve mucho en Galicia durante el invierno. ʝwˈeβe mˈuʧo eŋ ɡalˈisja ðuɾˈante el imbjˈeɾno.
|
|
26
|
+
it Buongiorno a tutti! bwɔnʤˈorno a tˈutːɪ!
|
|
27
|
+
it Il treno per Roma parte alle 15:45 dal binario 3. il trˈɛno per rˈoma pˈarte ˌalle kwˈindiʧɪ e kwarantaʧˈinkwe dal binˈario trˈe.
|
|
28
|
+
it Ho comprato 12 uova e 2 chili di pane per 7,50 euro. ˈɔ komprˈato dˈɔdiʧɪ wˈɔva e dˈue kˈilɪ dɪ pˈane per sˈɛtːe vˈirɡola ʧinkwˈanta ˈɛuro.
|
|
29
|
+
it Gli gnocchi della nonna sono squisiti. ʎɪ ɲˈɔkːɪ dˌella nˈɔnna sˈono skwizˈitɪ.
|
|
30
|
+
it Perché sei arrivato così tardi ieri sera? perkˈe sˈɛi arɾivˈato kozˈi tˈardɪ jˈerɪ sˈera?
|
|
31
|
+
it La città di Firenze è famosa per l'arte rinascimentale. la ʧitːˈa dɪ firˈɛntse ɛ famˈoza per lˈarte rinaʃimentˈale.
|
|
32
|
+
ru Привет, как у тебя дела? prʲɪvʲˈet, kak u tʲɪbʲˈa dʲɪɫˈa?
|
|
33
|
+
ru Замок на двери старого замка был сломан. zˈamək nˈa dvʲɪrʲˈi stˈarəvə zˈamkə bɨɫ sɫˈomən.
|
|
34
|
+
ru В 2024 году мы поехали в Санкт-Петербург. v dvʲe tˈɨsʲɪʧɪ dvˈaʦːɨtʲ ʧɪtvʲˈɵrtəm ɡɐdˈu mɨ pɐˈjexəlʲɪ v sankt pʲɪtʲɪrbˈurk.
|
|
35
|
+
ru Я купил 3 килограмма яблок за 250 рублей. ja kʊpʲˈiɫ trʲi kʲɪɫɐɡrˈamːə ˈjabɫək za dvʲˈesʲtʲɪ pʲɪdʲɪsʲˈat rʊblʲˈej.
|
|
36
|
+
ru Мама мыла раму, а папа читал газету. mˈamə mˈɨɫə rˈamʊ, ˈa pˈapə ʧɪtˈaɫ ɡɐzʲˈetʊ.
|
|
37
|
+
ru Все пришли, и всё было хорошо. fsʲˈɵ prʲɪʂlʲˈi, i fsʲˈɵ bˈɨɫə xərɐʂˈo.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Install the polyg2p wheel from <wheel dir> into a fresh venv per Python version and run
|
|
3
|
+
# smoke.py without data and with the public data folder.
|
|
4
|
+
# usage: run.sh <wheel dir> <data dir> env: SMOKE_PYTHONS (default "3.9 3.12")
|
|
5
|
+
set -eu
|
|
6
|
+
here=$(cd "$(dirname "$0")" && pwd)
|
|
7
|
+
wheels=$1
|
|
8
|
+
data=$2
|
|
9
|
+
for py in ${SMOKE_PYTHONS:-3.9 3.12}; do
|
|
10
|
+
venv="$PWD/.smoke-venv-$py"
|
|
11
|
+
uv venv -q --python "$py" "$venv"
|
|
12
|
+
uv pip install -q --python "$venv" --no-index --no-deps --only-binary :all: --find-links "$wheels" polyg2p
|
|
13
|
+
if [ -x "$venv/bin/python" ]; then pybin="$venv/bin/python"; else pybin="$venv/Scripts/python.exe"; fi
|
|
14
|
+
"$pybin" -I -c "import sys, platform; print(sys.version.split()[0], platform.platform(), platform.machine())"
|
|
15
|
+
# CC BY-SA lexicons must never be packaged: a release wheel has no data folder.
|
|
16
|
+
"$pybin" -I -c "import glob, sys, zipfile
|
|
17
|
+
for w in glob.glob(sys.argv[1] + '/*.whl'):
|
|
18
|
+
names = zipfile.ZipFile(w).namelist()
|
|
19
|
+
print(w, len(names), 'files')
|
|
20
|
+
assert not [n for n in names if n.startswith('polyg2p/data/')], w + ' contains polyg2p/data/'" "$wheels"
|
|
21
|
+
"$pybin" -I "$here/smoke.py" - "$here/expected-nodata.tsv"
|
|
22
|
+
"$pybin" -I "$here/smoke.py" "$data" "$here/expected-pubdata.tsv"
|
|
23
|
+
done
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Smoke test for an installed polyg2p wheel.
|
|
2
|
+
|
|
3
|
+
usage: python smoke.py <data_dir|-> <expected.tsv> ('-' = no data folder)
|
|
4
|
+
|
|
5
|
+
expected.tsv rows are lang<TAB>text<TAB>ipa. Every text is phonemized one by one and
|
|
6
|
+
in one batch per language; both must equal the expected ipa exactly.
|
|
7
|
+
"""
|
|
8
|
+
import sys
|
|
9
|
+
from collections import defaultdict
|
|
10
|
+
|
|
11
|
+
import polyg2p
|
|
12
|
+
from polyg2p import Phonemizer
|
|
13
|
+
|
|
14
|
+
data, expected = sys.argv[1:3]
|
|
15
|
+
p = Phonemizer(None if data == "-" else data)
|
|
16
|
+
rows = []
|
|
17
|
+
with open(expected, encoding="utf-8", newline="\n") as f:
|
|
18
|
+
for line in f:
|
|
19
|
+
line = line.rstrip("\n")
|
|
20
|
+
if line and not line.startswith("#"):
|
|
21
|
+
rows.append(tuple(line.split("\t")))
|
|
22
|
+
bad = 0
|
|
23
|
+
by_lang = defaultdict(list)
|
|
24
|
+
for lang, text, want in rows:
|
|
25
|
+
got = p.phonemize(text, lang)
|
|
26
|
+
by_lang[lang].append((text, want))
|
|
27
|
+
if got != want:
|
|
28
|
+
bad += 1
|
|
29
|
+
print(f"MISMATCH [{lang}] {text}\n want: {want}\n got: {got}")
|
|
30
|
+
for lang, items in by_lang.items():
|
|
31
|
+
batch = p.engine.phonemize_batch([t for t, _ in items], lang)
|
|
32
|
+
for (text, want), got in zip(items, batch):
|
|
33
|
+
if got != want:
|
|
34
|
+
bad += 1
|
|
35
|
+
print(f"BATCH MISMATCH [{lang}] {text}\n want: {want}\n got: {got}")
|
|
36
|
+
print(f"{polyg2p.__file__} data={data}: {len(rows)} rows, {bad} mismatches")
|
|
37
|
+
sys.exit(1 if bad else 0)
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
name: wheels
|
|
2
|
+
|
|
3
|
+
# Builds the abi3 wheels (one per platform, CPython >= 3.9) and the sdist, installs every
|
|
4
|
+
# wheel and runs .github/smoke on it, and publishes to PyPI on a v* tag.
|
|
5
|
+
#
|
|
6
|
+
# aarch64 targets are built with `--cfg polyg2p_portable`: the tagger then uses the same
|
|
7
|
+
# generic f32 kernels as x86-64, so every platform gives the same output.
|
|
8
|
+
#
|
|
9
|
+
# The smoke test also runs with the public (Apache-2.0 / BSD) data folder from DATA_COMMIT;
|
|
10
|
+
# release wheels never contain a data folder.
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
branches: ["release/**"]
|
|
15
|
+
tags: ["v*"]
|
|
16
|
+
pull_request:
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
env:
|
|
23
|
+
MATURIN_VERSION: v1.16.0
|
|
24
|
+
RUST_TOOLCHAIN: "1.97.1"
|
|
25
|
+
DATA_COMMIT: a3f1db6dae3eb3dd5312da90391f1d123b3d4e96
|
|
26
|
+
DATA_PATH: bindings/python/python/polyg2p/data
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
linux:
|
|
30
|
+
name: linux ${{ matrix.platform.libc }} ${{ matrix.platform.target }}
|
|
31
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
platform:
|
|
36
|
+
- { runner: ubuntu-24.04, target: x86_64, libc: manylinux, compat: "2014", rustflags: "" }
|
|
37
|
+
- { runner: ubuntu-24.04-arm, target: aarch64, libc: manylinux, compat: "2014", rustflags: "--cfg polyg2p_portable" }
|
|
38
|
+
- { runner: ubuntu-24.04, target: x86_64, libc: musllinux, compat: musllinux_1_2, rustflags: "" }
|
|
39
|
+
- { runner: ubuntu-24.04-arm, target: aarch64, libc: musllinux, compat: musllinux_1_2, rustflags: "--cfg polyg2p_portable" }
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
- name: build
|
|
43
|
+
uses: PyO3/maturin-action@v1
|
|
44
|
+
env:
|
|
45
|
+
RUSTFLAGS: ${{ matrix.platform.rustflags }}
|
|
46
|
+
with:
|
|
47
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
48
|
+
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
49
|
+
target: ${{ matrix.platform.target }}
|
|
50
|
+
manylinux: ${{ matrix.platform.compat }}
|
|
51
|
+
args: --release --out dist -m bindings/python/Cargo.toml
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
with:
|
|
54
|
+
ref: ${{ env.DATA_COMMIT }}
|
|
55
|
+
path: smokedata
|
|
56
|
+
sparse-checkout: ${{ env.DATA_PATH }}
|
|
57
|
+
- uses: astral-sh/setup-uv@v6
|
|
58
|
+
- name: smoke test (manylinux, on the runner)
|
|
59
|
+
if: matrix.platform.libc == 'manylinux'
|
|
60
|
+
run: sh .github/smoke/run.sh dist "smokedata/$DATA_PATH"
|
|
61
|
+
- name: smoke test (musllinux, in Alpine)
|
|
62
|
+
if: matrix.platform.libc == 'musllinux'
|
|
63
|
+
run: |
|
|
64
|
+
docker run --rm -v "$PWD:/w" -w /w -e SMOKE_PYTHONS="3.12" \
|
|
65
|
+
ghcr.io/astral-sh/uv:python3.12-alpine \
|
|
66
|
+
sh .github/smoke/run.sh dist "smokedata/$DATA_PATH"
|
|
67
|
+
- uses: actions/upload-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: wheels-linux-${{ matrix.platform.libc }}-${{ matrix.platform.target }}
|
|
70
|
+
path: dist/*.whl
|
|
71
|
+
if-no-files-found: error
|
|
72
|
+
|
|
73
|
+
macos:
|
|
74
|
+
name: macos ${{ matrix.platform.target }}
|
|
75
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
76
|
+
strategy:
|
|
77
|
+
fail-fast: false
|
|
78
|
+
matrix:
|
|
79
|
+
platform:
|
|
80
|
+
- { runner: macos-14, target: aarch64-apple-darwin, rustflags: "--cfg polyg2p_portable" }
|
|
81
|
+
- { runner: macos-15-intel, target: x86_64-apple-darwin, rustflags: "" }
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v4
|
|
84
|
+
- name: build
|
|
85
|
+
uses: PyO3/maturin-action@v1
|
|
86
|
+
env:
|
|
87
|
+
RUSTFLAGS: ${{ matrix.platform.rustflags }}
|
|
88
|
+
with:
|
|
89
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
90
|
+
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
91
|
+
target: ${{ matrix.platform.target }}
|
|
92
|
+
args: --release --out dist -m bindings/python/Cargo.toml
|
|
93
|
+
- uses: actions/checkout@v4
|
|
94
|
+
with:
|
|
95
|
+
ref: ${{ env.DATA_COMMIT }}
|
|
96
|
+
path: smokedata
|
|
97
|
+
sparse-checkout: ${{ env.DATA_PATH }}
|
|
98
|
+
- uses: astral-sh/setup-uv@v6
|
|
99
|
+
- name: smoke test
|
|
100
|
+
run: sh .github/smoke/run.sh dist "smokedata/$DATA_PATH"
|
|
101
|
+
- uses: actions/upload-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
104
|
+
path: dist/*.whl
|
|
105
|
+
if-no-files-found: error
|
|
106
|
+
|
|
107
|
+
windows:
|
|
108
|
+
name: windows ${{ matrix.platform.target }}
|
|
109
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
110
|
+
strategy:
|
|
111
|
+
fail-fast: false
|
|
112
|
+
matrix:
|
|
113
|
+
platform:
|
|
114
|
+
- { runner: windows-latest, target: x86_64-pc-windows-msvc, rustflags: "", pythons: "3.9 3.12" }
|
|
115
|
+
- { runner: windows-11-arm, target: aarch64-pc-windows-msvc, rustflags: "--cfg polyg2p_portable", pythons: "3.12 3.13" }
|
|
116
|
+
defaults:
|
|
117
|
+
run:
|
|
118
|
+
shell: bash
|
|
119
|
+
steps:
|
|
120
|
+
- uses: actions/checkout@v4
|
|
121
|
+
- name: build
|
|
122
|
+
uses: PyO3/maturin-action@v1
|
|
123
|
+
env:
|
|
124
|
+
RUSTFLAGS: ${{ matrix.platform.rustflags }}
|
|
125
|
+
with:
|
|
126
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
127
|
+
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
128
|
+
target: ${{ matrix.platform.target }}
|
|
129
|
+
args: --release --out dist -m bindings/python/Cargo.toml --features pyo3/generate-import-lib
|
|
130
|
+
- uses: actions/checkout@v4
|
|
131
|
+
with:
|
|
132
|
+
ref: ${{ env.DATA_COMMIT }}
|
|
133
|
+
path: smokedata
|
|
134
|
+
sparse-checkout: ${{ env.DATA_PATH }}
|
|
135
|
+
- uses: astral-sh/setup-uv@v6
|
|
136
|
+
- name: smoke test
|
|
137
|
+
env:
|
|
138
|
+
SMOKE_PYTHONS: ${{ matrix.platform.pythons }}
|
|
139
|
+
run: sh .github/smoke/run.sh dist "smokedata/$DATA_PATH"
|
|
140
|
+
- uses: actions/upload-artifact@v4
|
|
141
|
+
with:
|
|
142
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
143
|
+
path: dist/*.whl
|
|
144
|
+
if-no-files-found: error
|
|
145
|
+
|
|
146
|
+
sdist:
|
|
147
|
+
runs-on: ubuntu-24.04
|
|
148
|
+
steps:
|
|
149
|
+
- uses: actions/checkout@v4
|
|
150
|
+
- name: build sdist
|
|
151
|
+
uses: PyO3/maturin-action@v1
|
|
152
|
+
with:
|
|
153
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
154
|
+
command: sdist
|
|
155
|
+
args: --out dist -m bindings/python/Cargo.toml
|
|
156
|
+
- uses: actions/checkout@v4
|
|
157
|
+
with:
|
|
158
|
+
ref: ${{ env.DATA_COMMIT }}
|
|
159
|
+
path: smokedata
|
|
160
|
+
sparse-checkout: ${{ env.DATA_PATH }}
|
|
161
|
+
- uses: astral-sh/setup-uv@v6
|
|
162
|
+
- uses: dtolnay/rust-toolchain@master
|
|
163
|
+
with:
|
|
164
|
+
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
165
|
+
- name: build a wheel from the sdist and smoke test it
|
|
166
|
+
run: |
|
|
167
|
+
if tar -tzf dist/*.tar.gz | grep -q 'polyg2p/data/'; then echo "sdist contains polyg2p/data/"; exit 1; fi
|
|
168
|
+
uv build --wheel --out-dir fromsdist dist/*.tar.gz
|
|
169
|
+
SMOKE_PYTHONS="3.12" sh .github/smoke/run.sh fromsdist "smokedata/$DATA_PATH"
|
|
170
|
+
- uses: actions/upload-artifact@v4
|
|
171
|
+
with:
|
|
172
|
+
name: wheels-sdist
|
|
173
|
+
path: dist/*.tar.gz
|
|
174
|
+
if-no-files-found: error
|
|
175
|
+
|
|
176
|
+
publish:
|
|
177
|
+
name: publish to PyPI
|
|
178
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
179
|
+
needs: [linux, macos, windows, sdist]
|
|
180
|
+
runs-on: ubuntu-24.04
|
|
181
|
+
environment:
|
|
182
|
+
name: pypi
|
|
183
|
+
url: https://pypi.org/project/polyg2p/
|
|
184
|
+
permissions:
|
|
185
|
+
id-token: write
|
|
186
|
+
steps:
|
|
187
|
+
- uses: actions/checkout@v4
|
|
188
|
+
- name: tag matches the package version
|
|
189
|
+
run: |
|
|
190
|
+
version=$(sed -n 's/^version = "\(.*\)"/\1/p' bindings/python/pyproject.toml)
|
|
191
|
+
test "${GITHUB_REF_NAME}" = "v${version}" || { echo "tag ${GITHUB_REF_NAME} != v${version}"; exit 1; }
|
|
192
|
+
- uses: actions/download-artifact@v4
|
|
193
|
+
with:
|
|
194
|
+
pattern: wheels-*
|
|
195
|
+
path: dist
|
|
196
|
+
merge-multiple: true
|
|
197
|
+
- run: ls -l dist
|
|
198
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|