mwl-phonemizer 0.0.2__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.
- mwl_phonemizer-0.0.2/PKG-INFO +6 -0
- mwl_phonemizer-0.0.2/README.md +98 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/__init__.py +70 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/base.py +115 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/central.json +147 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/crf_mwl.py +258 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/epitran_mwl.py +411 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/espeak_mwl.py +470 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/g2p.json +102 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/ngram_mwl.py +364 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/orthography_hand_rules.py +576 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/raiano.json +4 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/sendinese.json +13 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer/version.py +10 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer.egg-info/PKG-INFO +6 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer.egg-info/SOURCES.txt +18 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer.egg-info/dependency_links.txt +1 -0
- mwl_phonemizer-0.0.2/mwl_phonemizer.egg-info/top_level.txt +1 -0
- mwl_phonemizer-0.0.2/setup.cfg +4 -0
- mwl_phonemizer-0.0.2/setup.py +54 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# **Mirandese Phonemizer**
|
|
2
|
+
|
|
3
|
+
This repository contains a Python-based Mirandese phonemizer, designed to convert Mirandese text into its International Phonetic Alphabet (IPA) representation. It supports different Mirandese dialects and incorporates various phonological rules based on linguistic information from Wikipedia.
|
|
4
|
+
|
|
5
|
+
## **Features**
|
|
6
|
+
|
|
7
|
+
* **Grapheme-to-Phoneme Conversion:** Converts Mirandese graphemes (letters and digraphs) to their corresponding IPA phonemes.
|
|
8
|
+
* **Contextual Rules:** Applies phonological rules based on surrounding characters (e.g., lenition of voiced stops, sibilant variations, vowel glides).
|
|
9
|
+
* **Dialectal Support:**
|
|
10
|
+
* Handles the specific lh to l pronunciation change in the Sendinese dialect.
|
|
11
|
+
* Includes word-level lookup dictionaries for Central, Raiano, and Sendinese dialects to handle irregular pronunciations.
|
|
12
|
+
* **Latin Cluster Evolution:** Converts Latin initial consonant clusters (pl, kl, fl) to /tʃ/.
|
|
13
|
+
* **Proto-Romance Medial Clusters:** Converts Proto-Romance medial clusters (-ly-, -cl-) to /ʎ/.
|
|
14
|
+
* **Double Consonant Palatalization:** Handles palatalization of double ll to /ʎ/ and nn to /ɲ/.
|
|
15
|
+
* **Proto-Romance -mn-:** Converts -mn- to /m/.
|
|
16
|
+
* **Output Customization:** Options to keep or remove optional phonemes (in parentheses) and stress marks/syllable dots.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## **Usage**
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
# pick one
|
|
24
|
+
from mwl_phonemizer.crf_mwl import CRFPhonemizer
|
|
25
|
+
from mwl_phonemizer.epitran_mwl import EpitranMWL
|
|
26
|
+
from mwl_phonemizer.espeak_mwl import EspeakMWL
|
|
27
|
+
from mwl_phonemizer.ngram_mwl import NgramMWLPhonemizer
|
|
28
|
+
from mwl_phonemizer.orthography_hand_rules import OrthographyRulesMWL
|
|
29
|
+
|
|
30
|
+
sample_texts = [
|
|
31
|
+
"Muitas lhénguas ténen proua de ls sous pergaminos antigos, de la lhiteratura screbida hai cientos d'anhos i de scritores hai muito afamados, hoije bandeiras dessas lhénguas. Mas outras hai que nun puoden tener proua de nada desso, cumo ye l causo de la lhéngua mirandesa.",
|
|
32
|
+
"Todos ls seres houmanos nácen lhibres i eiguales an honra i an dreitos. Dotados de rezon i de cuncéncia, dében de se dar bien uns culs outros i cumo armano",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
phonemizer = EpitranMWL()
|
|
36
|
+
for text in sample_texts:
|
|
37
|
+
print(f"Original: {text}")
|
|
38
|
+
print(f"Phonemized: {phonemizer.phonemize_sentence(text)}\n")
|
|
39
|
+
|
|
40
|
+
# Original: Muitas lhénguas ténen proua de ls sous pergaminos antigos, de la lhiteratura screbida hai cientos d'anhos i de scritores hai muito afamados, hoije bandeiras dessas lhénguas. Mas outras hai que nun puoden tener proua de nada desso, cumo ye l causo de la lhéngua mirandesa.
|
|
41
|
+
# Phonemized: mujtɐs̺ ʎenɡɐs̺ tenɛ̃ pɾowuɐ dɛ ls̺ sowus̺ pɛɾɡɐminos̺ ɐntiɡos̺, dɛ ʎɐ ʎitɛɾɐtuɾɐ s̺kɾβdɐ aj s̻iɛntos̻ d'ɐnos̺ i dɛ s̺kɾitoɾɛs̺ aj mujtu ɐfɐmðs̺, owiʒɛ bɐndɛjɾɐs̺ dɛʃsɐs̺ ʎenɡɐs̺. mɐs̺ owutrɐs̺ aj kʷɛ nũ puð̃ tɨˈneɾ pɾowuɐ dɛ nð dɛʃsu, kumu ˈje l̩ kawzu dɛ ʎɐ ˈʎɛ̃ɡwɐ miɾɐndɛzɐ.
|
|
42
|
+
|
|
43
|
+
# Original: Todos ls seres houmanos nácen lhibres i eiguales an honra i an dreitos. Dotados de rezon i de cuncéncia, dében de se dar bien uns culs outros i cumo armano
|
|
44
|
+
# Phonemized: tðs̺ ls̺ sɛɾɛs̺ owumɐnos̺ nazɛ̃ ʎibrɛs̺ i ɛjɡɐlɛs̺ ɐ̃ onrɐ i ɐ̃ dɾɛjtos̺. dotðs̺ dɛ rɛzõ i dɛ kuns̻ens̻iɐ, dβ̃ dɛ sɛ dɐɾ biɛ̃ uns̺ kuls̺ owutros̺ i kumu ɐɾmɐnu
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### **Helper Functions**
|
|
48
|
+
|
|
49
|
+
The base class provides static methods for cleaning up IPA output:
|
|
50
|
+
|
|
51
|
+
- **`strip_markers(ipa: str)`**: Removes syllable dots (`.`) and optional phoneme parentheses (`()`).
|
|
52
|
+
- **`strip_stress(ipa: str)`**: Removes primary (`ˈ`) and secondary (`ˌ`) stress markers.
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
ipa_with_markers = "ˈe(j).ʒɛmˈplu"
|
|
56
|
+
clean_ipa = phonemizer.strip_markers(ipa_with_markers)
|
|
57
|
+
print(f"Clean IPA: {clean_ipa}")
|
|
58
|
+
# Output: Clean IPA: ˈejʒɛmˈplu
|
|
59
|
+
|
|
60
|
+
ipa_with_stress = "miɾɐ̃ˈdes̺"
|
|
61
|
+
stress_agnostic_ipa = phonemizer.strip_stress(ipa_with_stress)
|
|
62
|
+
print(f"Stress-Agnostic IPA: {stress_agnostic_ipa}")
|
|
63
|
+
# Output: Stress-Agnostic IPA: miɾɐ̃des̺
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## **Phonemizer Comparison**
|
|
69
|
+
|
|
70
|
+
| Phonemizer | PER (Full IPA, Stress) | PER (Stress-Agnostic) | Words Incorrect (ED>0) | Notes |
|
|
71
|
+
| --------------------- |------------------------|-----------------------| ---------------------- | --------------------------------------------------------- |
|
|
72
|
+
| **CRF** | 20.25% | 20.76% | 117 | Character-level CRF trained on aligned word–phoneme pairs |
|
|
73
|
+
| **N-gram (n=4)** | 43.93% | 30.98% | 141 | Statistical N-gram model for G2P conversion |
|
|
74
|
+
| **Orthography Rules** | 39.04% | 31.99% | 136 | Handcrafted orthographic rules for all dialects |
|
|
75
|
+
| **Epitran** | 51.37% → 47.26% | 44.89% → 40.07% | 145 | Epitran output corrected with Mirandese-specific rules |
|
|
76
|
+
| **Espeak** | 59.98% → 52.35% | 39.51% → 30.30% | 145 | Espeak IPA output corrected with rules |
|
|
77
|
+
|
|
78
|
+
**Notes:**
|
|
79
|
+
|
|
80
|
+
- For **Epitran** and **Espeak**, the first value is the initial phonemization output; the second is after applying correction rules.
|
|
81
|
+
- **PER (Phoneme Error Rate)** measures the proportion of phonemes differing from the gold standard IPA transcription.
|
|
82
|
+
- **Stress-Agnostic PER** ignores stress marks.
|
|
83
|
+
- **lower PER does not necessarily mean a better phonemizer**
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## **Future Work**
|
|
88
|
+
|
|
89
|
+
* **Stress Prediction:** Implement machine learning or rule-based stress placement.
|
|
90
|
+
* **Larger Dataset:** Expand training and evaluation beyond ~150 words.
|
|
91
|
+
* **Neural Approaches:** Explore Transformer or seq2seq models for improved G2P accuracy.
|
|
92
|
+
* **Dialectal Coverage:** Add more irregular forms and dialect-specific exceptions.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## **Contributing**
|
|
97
|
+
|
|
98
|
+
Feel free to open issues or submit pull requests for improvements, bug fixes, or new dialect support.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from mwl_phonemizer.crf_mwl import CRFPhonemizer
|
|
2
|
+
from mwl_phonemizer.epitran_mwl import EpitranMWL
|
|
3
|
+
from mwl_phonemizer.espeak_mwl import EspeakMWL
|
|
4
|
+
from mwl_phonemizer.ngram_mwl import NgramMWLPhonemizer
|
|
5
|
+
from mwl_phonemizer.orthography_hand_rules import OrthographyRulesMWL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
if __name__ == "__main__":
|
|
9
|
+
sample_texts = [
|
|
10
|
+
"Muitas lhénguas ténen proua de ls sous pergaminos antigos, de la lhiteratura screbida hai cientos d'anhos i de scritores hai muito afamados, hoije bandeiras dessas lhénguas. Mas outras hai que nun puoden tener proua de nada desso, cumo ye l causo de la lhéngua mirandesa.",
|
|
11
|
+
"Todos ls seres houmanos nácen lhibres i eiguales an honra i an dreitos. Dotados de rezon i de cuncéncia, dében de se dar bien uns culs outros i cumo armano",
|
|
12
|
+
"Hai más fuogo alhá, i ye deimingo!",
|
|
13
|
+
"""Quien dirie qu'antre ls matos eiriçados
|
|
14
|
+
Las ourriêtas i ls rius d'esta tiêrra,
|
|
15
|
+
Bibie, cumo l chaugarço de la siêrra,
|
|
16
|
+
Ua lhéngua de sons tan bariados?
|
|
17
|
+
|
|
18
|
+
Mostre-se i fale-s' essa lhéngua filha
|
|
19
|
+
D'un pobo que ten neilha l choro i l canto!
|
|
20
|
+
Nada por ciêrto mos cautiba tanto
|
|
21
|
+
Cumo la form' an que l'eideia brilha.
|
|
22
|
+
|
|
23
|
+
Zgraçiado d'aquel, qu'abandonando
|
|
24
|
+
La patri' an que naciu, la casa i l huôrto.
|
|
25
|
+
Tamien se squeçe de la fala! Quando
|
|
26
|
+
L furdes ber, talbéç que stéia muôrto!"""
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
phonemizer = EpitranMWL()
|
|
30
|
+
for text in sample_texts:
|
|
31
|
+
print(f"Original: {text}")
|
|
32
|
+
print(f"Phonemized: {phonemizer.phonemize_sentence(text)}\n")
|
|
33
|
+
|
|
34
|
+
# Original: Muitas lhénguas ténen proua de ls sous pergaminos antigos, de la lhiteratura screbida hai cientos d'anhos i de scritores hai muito afamados, hoije bandeiras dessas lhénguas. Mas outras hai que nun puoden tener proua de nada desso, cumo ye l causo de la lhéngua mirandesa.
|
|
35
|
+
# Phonemized: mujtɐs̺ ʎenɡɐs̺ tenɛ̃ pɾowuɐ dɛ ls̺ sowus̺ pɛɾɡɐminos̺ ɐntiɡos̺, dɛ ʎɐ ʎitɛɾɐtuɾɐ s̺kɾβdɐ aj s̻iɛntos̻ d'ɐnos̺ i dɛ s̺kɾitoɾɛs̺ aj mujtu ɐfɐmðs̺, owiʒɛ bɐndɛjɾɐs̺ dɛʃsɐs̺ ʎenɡɐs̺. mɐs̺ owutrɐs̺ aj kʷɛ nũ puð̃ tɨˈneɾ pɾowuɐ dɛ nð dɛʃsu, kumu ˈje l̩ kawzu dɛ ʎɐ ˈʎɛ̃ɡwɐ miɾɐndɛzɐ.
|
|
36
|
+
#
|
|
37
|
+
# Original: Todos ls seres houmanos nácen lhibres i eiguales an honra i an dreitos. Dotados de rezon i de cuncéncia, dében de se dar bien uns culs outros i cumo armano
|
|
38
|
+
# Phonemized: tðs̺ ls̺ sɛɾɛs̺ owumɐnos̺ nazɛ̃ ʎibrɛs̺ i ɛjɡɐlɛs̺ ɐ̃ onrɐ i ɐ̃ dɾɛjtos̺. dotðs̺ dɛ rɛzõ i dɛ kuns̻ens̻iɐ, dβ̃ dɛ sɛ dɐɾ biɛ̃ uns̺ kuls̺ owutros̺ i kumu ɐɾmɐnu
|
|
39
|
+
#
|
|
40
|
+
# Original: Hai más fuogo alhá, i ye deimingo!
|
|
41
|
+
# Phonemized: aj mas̺ fwoɣʊ ɐˈʎa, i ˈje dejˈmĩgʊ!
|
|
42
|
+
#
|
|
43
|
+
# Original: Quien dirie qu'antre ls matos eiriçados
|
|
44
|
+
# Las ourriêtas i ls rius d'esta tiêrra,
|
|
45
|
+
# Bibie, cumo l chaugarço de la siêrra,
|
|
46
|
+
# Ua lhéngua de sons tan bariados?
|
|
47
|
+
#
|
|
48
|
+
# Mostre-se i fale-s' essa lhéngua filha
|
|
49
|
+
# D'un pobo que ten neilha l choro i l canto!
|
|
50
|
+
# Nada por ciêrto mos cautiba tanto
|
|
51
|
+
# Cumo la form' an que l'eideia brilha.
|
|
52
|
+
#
|
|
53
|
+
# Zgraçiado d'aquel, qu'abandonando
|
|
54
|
+
# La patri' an que naciu, la casa i l huôrto.
|
|
55
|
+
# Tamien se squeçe de la fala! Quando
|
|
56
|
+
# L furdes ber, talbéç que stéia muôrto!
|
|
57
|
+
# Phonemized: kʷiɛ̃ diɾiɛ k'ɐntɾɛ ls̺ mɐtos̺ ɛjɾisðs̻
|
|
58
|
+
# ʎɐs̺ owurietɐs̺ i ls̺ riws̺ d'ɛʃtɐ tierɐ,
|
|
59
|
+
# bβɛ, kumu l̩ kawɡɐɾsu dɛ ʎɐ s̻ierɐ,
|
|
60
|
+
# ˈũŋɐ ˈʎɛ̃ɡwɐ dɛ sons̺ tɐ̃ bɐɾiðs̺?
|
|
61
|
+
#
|
|
62
|
+
# moʃtɾɛ sɛ i fɐlɛ s̺̺' ɛʃsɐ ˈʎɛ̃ɡwɐ filɐ
|
|
63
|
+
# d'ũ pβ kʷɛ tɛ̃ nɛjlɐ l̩ koɾu i l̩ kɐntu!
|
|
64
|
+
# nð poɾ s̻ieɾtu mos̺ kawtβ tɐntu
|
|
65
|
+
# kumu ʎɐ foɾ' ɐ̃ kʷɛ l̩'ɛjdɛjɐ bɾilɐ.
|
|
66
|
+
#
|
|
67
|
+
# zɡɾɐs̻ið d'ɐkʷɛl, k'βndonɐndu
|
|
68
|
+
# ʎɐ pɐtri' ɐ̃ kʷɛ nɐziw, ʎɐ kɐzɐ i l̩ uoɾtu.
|
|
69
|
+
# tɐˈmjẽ sɛ s̻kʷɛsɛ dɛ ʎɐ fɐlɐ! ˈkwɐ̃du
|
|
70
|
+
# l̩ fuɾdɛs̺ bɛɾ, tɐlbes kʷɛ s̺tejɐ muoɾtu!
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
import json
|
|
3
|
+
import re
|
|
4
|
+
import os
|
|
5
|
+
from collections import Counter
|
|
6
|
+
import editdistance
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
class Dialects(str, Enum):
|
|
10
|
+
CENTRAL = "central"
|
|
11
|
+
RAIANO = "raiano"
|
|
12
|
+
SENDINESE = "sendinese"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class MirandesePhonemizer:
|
|
16
|
+
def __init__(self,
|
|
17
|
+
gold_dict: str | None = None,
|
|
18
|
+
raiano_dict: str | None = None, # dialect exceptions
|
|
19
|
+
sendinese_dict: str | None = None, # dialect exceptions
|
|
20
|
+
dialect: Dialects = Dialects.CENTRAL):
|
|
21
|
+
|
|
22
|
+
self.dialect = dialect
|
|
23
|
+
|
|
24
|
+
gold_dict = gold_dict or f"{os.path.dirname(__file__)}/central.json"
|
|
25
|
+
raiano_dict = raiano_dict or f"{os.path.dirname(__file__)}/raiano.json"
|
|
26
|
+
sendinese_dict = sendinese_dict or f"{os.path.dirname(__file__)}/sendinese.json"
|
|
27
|
+
|
|
28
|
+
with open(gold_dict, "r", encoding="utf-8") as f:
|
|
29
|
+
self.GOLD = {k: self.strip_markers(v) for k, v in json.load(f).items()}
|
|
30
|
+
with open(raiano_dict, "r", encoding="utf-8") as f:
|
|
31
|
+
self.RAIANO_GOLD = {k: self.strip_markers(v) for k, v in json.load(f).items()}
|
|
32
|
+
with open(sendinese_dict, "r", encoding="utf-8") as f:
|
|
33
|
+
self.SENDINESE_GOLD = {k: self.strip_markers(v) for k, v in json.load(f).items()}
|
|
34
|
+
|
|
35
|
+
def phonemize(self, word: str, lookup_word: bool = True) -> str:
|
|
36
|
+
if lookup_word and word.lower() in self.GOLD:
|
|
37
|
+
return self.GOLD[word.lower()]
|
|
38
|
+
raise ValueError(f"unknown word: '{word}'")
|
|
39
|
+
|
|
40
|
+
def phonemize_sentence(self,
|
|
41
|
+
text: str, lookup_word: bool = True):
|
|
42
|
+
text = text.replace("-", " ")
|
|
43
|
+
words = re.findall(r"\b\w+\b|[\W_]+", text) # Split by words and keep punctuation/spaces
|
|
44
|
+
phonemized_parts = []
|
|
45
|
+
for word_or_punc in words:
|
|
46
|
+
if word_or_punc.isalpha():
|
|
47
|
+
phonemized_parts.append(self.phonemize(word_or_punc, lookup_word=lookup_word))
|
|
48
|
+
else:
|
|
49
|
+
phonemized_parts.append(word_or_punc) # Keep punctuation and spaces as is
|
|
50
|
+
return "".join(phonemized_parts)
|
|
51
|
+
|
|
52
|
+
@staticmethod
|
|
53
|
+
def strip_markers(ipa: str) -> str:
|
|
54
|
+
return ipa.replace(".", "").replace("(", "").replace(")", "") # drop syllable/optional markers
|
|
55
|
+
|
|
56
|
+
@staticmethod
|
|
57
|
+
def strip_stress(ipa: str) -> str:
|
|
58
|
+
"""Removes the primary stress marker 'ˈ' for stress-agnostic comparison."""
|
|
59
|
+
return ipa.replace("ˈ", "").replace("ˌ", "")
|
|
60
|
+
|
|
61
|
+
@staticmethod
|
|
62
|
+
def word_edit_distance(a: str, b: str) -> int:
|
|
63
|
+
return editdistance.eval(a, b)
|
|
64
|
+
|
|
65
|
+
def evaluate_on_gold(self, limit=None, detailed=False, show_changes=False):
|
|
66
|
+
pairs = list(self.GOLD.items())
|
|
67
|
+
if limit:
|
|
68
|
+
pairs = pairs[:limit]
|
|
69
|
+
|
|
70
|
+
total_ed_after = 0
|
|
71
|
+
cnt = 0
|
|
72
|
+
improvements = Counter()
|
|
73
|
+
details = []
|
|
74
|
+
|
|
75
|
+
# Stress-agnostic metrics
|
|
76
|
+
total_ed_no_stress_after = 0
|
|
77
|
+
|
|
78
|
+
for ortho, gold_ipa in pairs:
|
|
79
|
+
phonemes = self.phonemize(ortho, lookup_word=False)
|
|
80
|
+
|
|
81
|
+
# Standard metrics (includes stress)
|
|
82
|
+
ed_after = self.word_edit_distance(phonemes, gold_ipa)
|
|
83
|
+
total_ed_after += ed_after
|
|
84
|
+
cnt += 1
|
|
85
|
+
|
|
86
|
+
# Stress-agnostic metrics (ignores stress)
|
|
87
|
+
corrected_no_stress = self.strip_stress(phonemes)
|
|
88
|
+
gold_ipa_no_stress = self.strip_stress(gold_ipa)
|
|
89
|
+
|
|
90
|
+
ed_after_no_stress = self.word_edit_distance(corrected_no_stress, gold_ipa_no_stress)
|
|
91
|
+
|
|
92
|
+
total_ed_no_stress_after += ed_after_no_stress
|
|
93
|
+
|
|
94
|
+
# Only append to details if the final corrected IPA does not match the gold (ED > 0)
|
|
95
|
+
if ed_after > 0:
|
|
96
|
+
details.append({
|
|
97
|
+
"word": ortho,
|
|
98
|
+
"phonemes": phonemes,
|
|
99
|
+
"gold": gold_ipa,
|
|
100
|
+
"ed": ed_after,
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
result = {
|
|
104
|
+
# Standard Metrics
|
|
105
|
+
"avg_edit_distance": total_ed_after / cnt if cnt else 0,
|
|
106
|
+
|
|
107
|
+
# Stress-Agnostic Metrics
|
|
108
|
+
"avg_edit_distance_no_stress": total_ed_no_stress_after / cnt if cnt else 0,
|
|
109
|
+
|
|
110
|
+
"counts": cnt,
|
|
111
|
+
"improvements": improvements,
|
|
112
|
+
"details": details
|
|
113
|
+
}
|
|
114
|
+
return result
|
|
115
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hai": "aj",
|
|
3
|
+
"más": "mas̺",
|
|
4
|
+
"mais": "majs̺",
|
|
5
|
+
"alhá": "ɐˈʎa",
|
|
6
|
+
"deimingo": "dejˈmĩ.gʊ",
|
|
7
|
+
"abandono": "a.bɐ̃ˈdo.nu",
|
|
8
|
+
"adbertido": "ɐ.dbɨɾˈti.du",
|
|
9
|
+
"adulto": "ɐˈdul.tu",
|
|
10
|
+
"afamado": "ɐ.fɐˈma.du",
|
|
11
|
+
"afeito": "ɐˈfej.tʊ",
|
|
12
|
+
"afelhado": "ɐ.fɨˈʎa.du",
|
|
13
|
+
"alternatibo": "al.tɨɾ.nɐˈti.bu",
|
|
14
|
+
"amarielho": "ɐ.mɐˈɾjɛ.ʎu",
|
|
15
|
+
"ambesible": "ɐ̃.bɨˈs̺i.blɨ",
|
|
16
|
+
"amouchado": "amowˈtʃaðu",
|
|
17
|
+
"amportante": "ɐ̃.puɾˈtɐ̃.tɨ",
|
|
18
|
+
"ampossible": "ɐ̃.puˈsi.blɨ",
|
|
19
|
+
"ampressionante": "ɐ̃.pɾɨ.sjuˈnɐ̃.tɨ",
|
|
20
|
+
"anchir": "ɐ̃.ˈtʃiɾ",
|
|
21
|
+
"antender": "ɐ̃.tɨ̃.ˈdeɾ",
|
|
22
|
+
"arena": "ɐˈɾenɐ",
|
|
23
|
+
"açpuis": "ɐsˈpujs̺",
|
|
24
|
+
"berde": "ˈveɾ.dɨ",
|
|
25
|
+
"besible": "bɨˈz̺i.blɨ",
|
|
26
|
+
"bexanar": "bɨ.ʃɐ.ˈnaɾ",
|
|
27
|
+
"bibal": "bi.ˈβaɫ",
|
|
28
|
+
"bielho": "bjɛʎu",
|
|
29
|
+
"biolento": "bjuˈlẽ.tu",
|
|
30
|
+
"biúba": "biˈuβɐ",
|
|
31
|
+
"brabo": "bɾa.bu",
|
|
32
|
+
"branco": "bɾɐ̃.ku",
|
|
33
|
+
"buono": "bwo.nu",
|
|
34
|
+
"burmeilho": "buɾˈmɐj.ʎu",
|
|
35
|
+
"bíblico": "bi.bli.ku",
|
|
36
|
+
"cabresto": "kɐˈbɾeʃ.tu",
|
|
37
|
+
"canhona": "kɐˈɲo.nɐ",
|
|
38
|
+
"cheno": "ˈtʃe.nu",
|
|
39
|
+
"chober": "tʃuˈβeɾ",
|
|
40
|
+
"ciguonha": "s̻i.ˈɣwo.ɲɐ",
|
|
41
|
+
"cul": "kul",
|
|
42
|
+
"dafeito": "ðɐˈfej.tʊ",
|
|
43
|
+
"defrente": "dɨˈfɾẽ.tɨ",
|
|
44
|
+
"defícel": "dɨˈfi.sɛl",
|
|
45
|
+
"drento": "ˈdɾẽtu",
|
|
46
|
+
"eigual": "ɐjˈɡwal",
|
|
47
|
+
"era": "ˈɛ.ɾɐ",
|
|
48
|
+
"eras": "ˈɛ.ɾɐs̺",
|
|
49
|
+
"feliç": "fɨˈlis̻",
|
|
50
|
+
"fierro": "ˈfjɛ.ru",
|
|
51
|
+
"francesa": "fɾɐ̃ˈsɛ.zɐ",
|
|
52
|
+
"francesas": "fɾɐ̃ˈsɛ.zɐs̺",
|
|
53
|
+
"franceses": "fɾɐ̃ˈsɛ.zɨs̺",
|
|
54
|
+
"francés": "fɾɐ̃ˈsɛs̺",
|
|
55
|
+
"fui": "fuj",
|
|
56
|
+
"fumos": "ˈfu.mus̺",
|
|
57
|
+
"fuogo": "fwo.ɣʊ",
|
|
58
|
+
"fuonte": "ˈfwõ.tɨ",
|
|
59
|
+
"fuorte": "ˈfwɔɾ.tɨ",
|
|
60
|
+
"fuortemente": "fwɔɾ.tɨˈmẽ.tɨ",
|
|
61
|
+
"fuorça": "ˈfwɔɾ.s̻ɐ",
|
|
62
|
+
"fuste": "ˈfus̺.tɨ",
|
|
63
|
+
"fácele": "ˈfa.sɨ.lɨ",
|
|
64
|
+
"guapo": "ˈɡwa.pu",
|
|
65
|
+
"haber": "ɐˈβeɾ",
|
|
66
|
+
"houmano": "o(w)ˈmɐ.nu",
|
|
67
|
+
"i": "i",
|
|
68
|
+
"l": "l̩",
|
|
69
|
+
"lhabrar": "ʎɐˈbɾaɾ(i)",
|
|
70
|
+
"lhimpo": "ˈʎĩ.pʊ",
|
|
71
|
+
"lhobo": "ˈʎo.bʊ",
|
|
72
|
+
"lhuç": "ˈʎus̻",
|
|
73
|
+
"lhéngua": "ˈʎɛ̃ɡwɐ",
|
|
74
|
+
"luç": "ˈʎus̻",
|
|
75
|
+
"macado": "mɐˈka.du",
|
|
76
|
+
"maias": "ˈmajɐs̺",
|
|
77
|
+
"mirandés": "mi.ɾɐ̃ˈdes̺",
|
|
78
|
+
"molineiro": "mʊ.li.ˈnei̯.rʊ",
|
|
79
|
+
"molino": "muˈlinu",
|
|
80
|
+
"muola": "ˈmu̯olɐ",
|
|
81
|
+
"ne l": "nɨl",
|
|
82
|
+
"neçairo": "nɨˈsaj.ɾu",
|
|
83
|
+
"nuobo": "ˈnwo.βʊ",
|
|
84
|
+
"nó": "ˈnɔ",
|
|
85
|
+
"onte": "ˈõ.tɨ",
|
|
86
|
+
"oucidental": "ow.s̻i.dẽˈtal",
|
|
87
|
+
"oufecialmente": "o(w).fɨˌsjalˈmẽ.tɨ",
|
|
88
|
+
"ourdenhar": "ou̯ɾdɨˈɲaɾ",
|
|
89
|
+
"oureginal": "ow.ɾɨ.ʒiˈnal",
|
|
90
|
+
"ourganizaçon": "ou̯r.ɡɐ.ni.zɐ.ˈsõ",
|
|
91
|
+
"ouropeu": "ow.ɾuˈpew",
|
|
92
|
+
"ourriêta": "ˈowrjetɐ",
|
|
93
|
+
"paxarina": "pɐʃɐˈɾinɐ",
|
|
94
|
+
"pequeinho": "pɨˈkɐi.ɲu",
|
|
95
|
+
"piranha": "piˈra.ɲɐ",
|
|
96
|
+
"puis": "ˈpujs̺",
|
|
97
|
+
"pul": "ˈpul",
|
|
98
|
+
"puorta": "ˈpwoɾtɐ",
|
|
99
|
+
"purmeiro": "puɾˈmɐj.ɾu",
|
|
100
|
+
"quaije": "ˈkwaj.ʒɨ",
|
|
101
|
+
"quando": "ˈkwɐ̃.du",
|
|
102
|
+
"quelobrinas": "kɨluˈbrinas̺",
|
|
103
|
+
"quemun": "kɨˈmun",
|
|
104
|
+
"rabielho": "rɐ.ˈβje.ʎu",
|
|
105
|
+
"rico": "ˈri.ku",
|
|
106
|
+
"salir": "s̺ɐˈliɾ",
|
|
107
|
+
"screbir": "s̺krɨˈβiɾ",
|
|
108
|
+
"segar": "s̺ɨˈɣaɾ",
|
|
109
|
+
"sendo": "ˈsẽ.du",
|
|
110
|
+
"ser": "ˈseɾ",
|
|
111
|
+
"sida": "ˈsi.dɐ",
|
|
112
|
+
"sidas": "ˈsi.dɐs̺",
|
|
113
|
+
"sido": "ˈsi.du",
|
|
114
|
+
"sidos": "ˈsi.dus̺",
|
|
115
|
+
"simple": "ˈs̺ĩ.plɨ",
|
|
116
|
+
"sobrino": "s̺uˈbɾinu",
|
|
117
|
+
"sodes": "ˈso.dɨs̺",
|
|
118
|
+
"somos": "ˈso.mus̺",
|
|
119
|
+
"son": "ˈsõ",
|
|
120
|
+
"sou": "ˈso(w)",
|
|
121
|
+
"spanha": "ˈs̺pɐ.ɲɐ",
|
|
122
|
+
"squierdo": "ˈs̺kjeɾ.du",
|
|
123
|
+
"sós": "ˈs̺ɔs̺",
|
|
124
|
+
"talbeç": "talˈbes",
|
|
125
|
+
"tamien": "tɐˈmjẽ",
|
|
126
|
+
"tascar": "tɐs̺.ˈkaɾ",
|
|
127
|
+
"tener": "tɨˈneɾ",
|
|
128
|
+
"trasdonte": "ˈtɾɐz̺dõtɨ",
|
|
129
|
+
"trasdontonte": "ˈtɾɐz̺dõtõtɨ",
|
|
130
|
+
"ye": "ˈje",
|
|
131
|
+
"you": "jow",
|
|
132
|
+
"yê": "ˈje",
|
|
133
|
+
"zastre": "ˈzas̺tɾɨ",
|
|
134
|
+
"zeigual": "zɐjˈɡwal",
|
|
135
|
+
"zenhar": "zɨˈɲaɾ",
|
|
136
|
+
"áfrica": "ˈafɾikɐ",
|
|
137
|
+
"çcansar": "skɐ̃ˈs̺aɾ",
|
|
138
|
+
"çcrebir": "skɾɨˈβiɾ",
|
|
139
|
+
"çcriçon": "skɾiˈsõ",
|
|
140
|
+
"çtinto": "ˈstĩ.tu",
|
|
141
|
+
"érades": "ˈɛ.ɾɐ.dɨs̺",
|
|
142
|
+
"éramos": "ˈɛ.ɾɐ.mus̺",
|
|
143
|
+
"éran": "ˈɛ.ɾɐn",
|
|
144
|
+
"ũ": "ˈũ",
|
|
145
|
+
"ũa": "ˈũ.ŋɐ",
|
|
146
|
+
"ua": "ˈũ.ŋɐ"
|
|
147
|
+
}
|