patch phoneme feature bug, add initWaffleState

This commit is contained in:
Sorrel Bri 2020-03-04 16:27:26 -08:00
parent ad364bbd07
commit 3f2c822c55
8 changed files with 716 additions and 74 deletions

View file

@ -14,9 +14,9 @@
; -- -TENSE = æ / ə / ɪ̞ / ɛ / ʌ / ʊ̞ / ɔ ; -- -TENSE = æ / ə / ɪ̞ / ɛ / ʌ / ʊ̞ / ɔ
; ---- DIPTHONGS = eə / eɪ̯ / ju̟ / äɪ̞ / ɔɪ̞ / oʊ̞ / aʊ̞ / ɑɹ / iɹ / ɛɹ / ɔɹ / ʊɹ ; ---- DIPTHONGS = eə / eɪ̯ / ju̟ / äɪ̞ / ɔɪ̞ / oʊ̞ / aʊ̞ / ɑɹ / iɹ / ɛɹ / ɔɹ / ʊɹ
; ---- CONSONANTS = p (pʰ) / b (b̥) / t (tʰ)(ɾ)(ʔ) / d (d̥)(ɾ) / tʃ (tʃʰ) / dʒ (d̥ʒ̊) / k (kʰ) / g (g̊) / f / v (v̥) / θ / ð (ð̥) / s / z (z̥) / ʃ / ʒ (ʒ̊) / h (ɦ)(ç) / m (ɱ)(m̩) / n(n̩) / ŋ / l (l̩)/ ɹ (ɹʲ ~ ɹˤ)(ɹ̩) / w (w̥) / j / x / ʔ ; ---- CONSONANTS = p (pʰ) / b (b̥) / t (tʰ)(ɾ)(ʔ) / d (d̥)(ɾ) / tʃ / dʒ (d̥ʒ̊) / k (kʰ) / g (g̊) / f / v (v̥) / θ / ð (ð̥) / s / z (z̥) / ʃ / ʒ (ʒ̊) / h (ɦ)(ç) / m (ɱ)(m̩) / n(n̩) / ŋ / l (l̩)/ ɹ (ɹʲ ~ ɹˤ)(ɹ̩) / w (w̥) / j / x / ʔ
; -- PLOSIVES = p / pʰ / t / tʰ ɾ / k / kʰ ; -- PLOSIVES = p / p' / pʰ / t / t' / tʰ ɾ / k / k' / kʰ
; -- AFFRICATES = tʃ tʃʰ / dʒ ; -- AFFRICATES = tʃ / dʒ
; -- FRICATIVES = f / v / θ / ð / s / z / ʃ / ʒ / ç / x ; -- FRICATIVES = f / v / θ / ð / s / z / ʃ / ʒ / ç / x
; -- NASAL OBSTRUENTS = m ɱ / n / ŋ ; -- NASAL OBSTRUENTS = m ɱ / n / ŋ
; -- LIQUIDS = l ; -- LIQUIDS = l
@ -32,9 +32,9 @@
[consonantal [consonantal
+= +=
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ / p / pʼ / pʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ /
; AFFRICATES ; AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; FRICATIVES ; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x / f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; NASALS ; NASALS
@ -66,9 +66,9 @@
m̩ / n̩ / l̩ / ɹ̩ m̩ / n̩ / l̩ / ɹ̩
-= -=
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ / p / pʼ / pʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ /
; AFFRICATES ; AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; FRICATIVES ; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x / f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; LARYNGEALS ; LARYNGEALS
@ -86,9 +86,9 @@
l̩ / ɹ̩ l̩ / ɹ̩
-= -=
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ / p / pʼ / pʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ /
; AFFRICATES ; AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; FRICATIVES ; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x / f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; NASALS ; NASALS
@ -122,28 +122,28 @@
ɦ ɦ
-= voiceless obstruents -= voiceless obstruents
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ / p / pʼ / pʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ /
; VOICELESS AFFRICATES ; VOICELESS AFFRICATES
tʃ / tʃʰ / tʃ / /
; VOICELESS FRICATIVES ; VOICELESS FRICATIVES
f / θ / s / ʃ / ç / x / f / θ / s / ʃ / ç / x /
; VOICELESS LARYNGEALS ; VOICELESS LARYNGEALS
h / ʔ h / ʔ
] ]
[spread-glottis [spreadGlottis
+= +=
; ASPIRATED PLOSIVES ; ASPIRATED PLOSIVES
pʰ / tʰ / kʰ / pʰ / tʰ / kʰ /
; ASPIRATED AFFRICATES ; ASPIRATED AFFRICATES
tʃʰ / /
; SPREAD LARYNGEALS ; SPREAD LARYNGEALS
h ɦ h ɦ
-= -=
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; UNASPIRATED PLOSIVES ; UNASPIRATED PLOSIVES
p / t ɾ / k / p / pʼ / t / tʼ / ɾ / k / kʼ /
; UNASPIRATED AFFRICATES ; UNASPIRATED AFFRICATES
tʃ / dʒ / tʃ / dʒ /
; FRICATIVES ; FRICATIVES
@ -159,19 +159,21 @@
; CONSTRICTED LARYNGEALS ; CONSTRICTED LARYNGEALS
ʔ ʔ
] ]
[constricted-glottis [constrictedGlottis
+= +=
; LARYNGEALIZED RHOTIC ; LARYNGEALIZED RHOTIC
ɹˤ / ɹˤ /
; CONSTRICTED LARYNGEAL ; CONSTRICTED LARYNGEAL
ʔ / ʔ /
; EJECTIVE PLOSIVES
pʼ / tʼ / kʼ
-= -=
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ / p / pʰ / t / tʰ ɾ / k / kʰ /
; AFFRICATES ; AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; FRICATIVES ; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x / f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; NASAL OBSTRUENTS ; NASAL OBSTRUENTS
@ -207,9 +209,9 @@
ɾ ɾ
-= -=
; NON-TAP PLOSIVES ; NON-TAP PLOSIVES
p / pʰ / t / tʰ / k / kʰ / p / pʼ / pʰ / t / tʼ / tʰ / k / kʼ / kʰ /
; AFFRICATES ; AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; NASALS ; NASALS
m ɱ / n / ŋ / m ɱ / n / ŋ /
; SYLLABIC NASALS ; SYLLABIC NASALS
@ -234,9 +236,9 @@
; SYLLABIC LIQUIDS ; SYLLABIC LIQUIDS
l̩ / ɹ̩ / l̩ / ɹ̩ /
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ / p / pʼ / pʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ /
; AFFRICATES ; AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
] ]
[strident [strident
@ -244,12 +246,12 @@
; STRIDENT FRICATIVES ; STRIDENT FRICATIVES
f / v / s / z / ʃ / ʒ / f / v / s / z / ʃ / ʒ /
; STRIDENT AFFRICATES ; STRIDENT AFFRICATES
tʃʰ / dʒ tʃ / dʒ
-= -=
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ / p / pʼ / pʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ /
; NON-STRIDENT FRICATIVES ; NON-STRIDENT FRICATIVES
θ / ð / ç / x / θ / ð / ç / x /
; NASAL OBSTRUENTS ; NASAL OBSTRUENTS
@ -272,9 +274,9 @@
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; PLOSIVES ; PLOSIVES
p / pʰ / t / tʰ ɾ / k / kʰ p / pʼ / pʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ
; AFFRICATES ; AFFRICATES
tʃʰ / dʒ tʃ / dʒ
; FRICATIVES ; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x f / v / θ / ð / s / z / ʃ / ʒ / ç / x
; NASAL OBSTRUENTS ; NASAL OBSTRUENTS
@ -296,7 +298,7 @@
; ROUNDED VOWELS ; ROUNDED VOWELS
u̟ / ʊ̞ / ɔ / u̟ / ʊ̞ / ɔ /
; LABIAL PLOSIVES ; LABIAL PLOSIVES
p / pʰ / p / pʼ / pʰ /
; LABIAL FRICATIVES ; LABIAL FRICATIVES
f / v / f / v /
; LABIAL NASALS ; LABIAL NASALS
@ -309,9 +311,9 @@
; UNROUNDED VOWELS ; UNROUNDED VOWELS
æ / e / ə / ɑ / ɪ̞ / ɛ / ʌ / i / æ / e / ə / ɑ / ɪ̞ / ɛ / ʌ / i /
; NON-LABIAL PLOSIVES ; NON-LABIAL PLOSIVES
t / tʰ ɾ / k / kʰ / t / tʼ / tʰ ɾ / k / kʼ / kʰ /
; NON-LABIAL AFFRICATES ; NON-LABIAL AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; NON-LABIAL FRICATIVES ; NON-LABIAL FRICATIVES
θ / ð / s / z / ʃ / ʒ / ç / x / θ / ð / s / z / ʃ / ʒ / ç / x /
; NON-LABIAL NASAL OBSTRUENTS ; NON-LABIAL NASAL OBSTRUENTS
@ -331,9 +333,9 @@
[coronal [coronal
+= +=
; CORONAL PLOSIVES ; CORONAL PLOSIVES
t / tʰ ɾ / t / tʼ / tʰ ɾ /
; CORONAL AFFRICATES ; CORONAL AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; CORONAL FRICATIVES ; CORONAL FRICATIVES
θ / ð / s / z / ʃ / ʒ / θ / ð / s / z / ʃ / ʒ /
; CORONAL NASALS ; CORONAL NASALS
@ -348,7 +350,7 @@
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; NON-CORONAL PLOSIVES ; NON-CORONAL PLOSIVES
p / pʰ / k / kʰ p / pʼ / pʰ / k / kʼ / kʰ
; NON-CORONAL FRICATIVES ; NON-CORONAL FRICATIVES
f / v / ç / x f / v / ç / x
; NON-CORONAL NASAL OBSTRUENTS ; NON-CORONAL NASAL OBSTRUENTS
@ -364,9 +366,9 @@
[anterior [anterior
+= +=
; ALVEOLAR PLOSIVES ; ALVEOLAR PLOSIVES
t / tʰ ɾ / t / tʼ / tʰ ɾ /
; ALVEOLAR AFFRICATES ; ALVEOLAR AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; DENTAL FRICATIVES ; DENTAL FRICATIVES
θ / ð / θ / ð /
; ALVEOLAR FRICATIVES ; ALVEOLAR FRICATIVES
@ -388,7 +390,7 @@
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; NON-CORONAL PLOSIVES ; NON-CORONAL PLOSIVES
p / pʰ / k / kʰ p / pʼ / pʰ / k / kʼ / kʰ
; NON-CORONAL FRICATIVES ; NON-CORONAL FRICATIVES
f / v / ç / x f / v / ç / x
; NON-CORONAL NASAL OBSTRUENTS ; NON-CORONAL NASAL OBSTRUENTS
@ -414,7 +416,7 @@
-= -=
; apical / retroflex ; apical / retroflex
; ALVEOLAR PLOSIVES ; ALVEOLAR PLOSIVES
t / tʰ ɾ / t / tʼ / tʰ ɾ /
; ALVEOLAR FRICATIVES ; ALVEOLAR FRICATIVES
s / z / s / z /
; ALVEOLAR NASALS ; ALVEOLAR NASALS
@ -427,7 +429,7 @@
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; NON-CORONAL PLOSIVES ; NON-CORONAL PLOSIVES
p / pʰ / k / kʰ p / pʼ / pʰ / k / kʼ / kʰ
; NON-CORONAL FRICATIVES ; NON-CORONAL FRICATIVES
f / v / ç / x f / v / ç / x
; NON-CORONAL NASAL OBSTRUENTS ; NON-CORONAL NASAL OBSTRUENTS
@ -447,7 +449,7 @@
; VOWELS ; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ / æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; DORSAL PLOSIVES ; DORSAL PLOSIVES
k / kʰ / k / kʼ / kʰ /
; DORSAL FRICATIVES ; DORSAL FRICATIVES
ç / x / ç / x /
; DORSAL NASAL OBSTRUENTS ; DORSAL NASAL OBSTRUENTS
@ -458,9 +460,9 @@
j j
-= -=
; NON-DORSAL PLOSIVES ; NON-DORSAL PLOSIVES
p / pʰ / t / tʰ ɾ / p / pʼ / pʰ / t / tʼ / tʰ ɾ /
; NON-DORSAL AFFRICATES ; NON-DORSAL AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; NON-DORSAL FRICATIVES ; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS ; NON-DORSAL NASALS
@ -480,7 +482,7 @@
; HIGH VOWELS ; HIGH VOWELS
i / u̟ / ʊ̞ / ɪ̞ i / u̟ / ʊ̞ / ɪ̞
; HIGH DORSAL PLOSIVES ; HIGH DORSAL PLOSIVES
k / kʰ / k / kʼ / kʰ /
; HIGH DORSAL FRICATIVES ; HIGH DORSAL FRICATIVES
ç / x / ç / x /
; HIGH DORSAL NASAL OBSTRUENTS ; HIGH DORSAL NASAL OBSTRUENTS
@ -496,9 +498,9 @@
ɹˤ ɹˤ
; -- NON-DORSALS ; -- NON-DORSALS
; NON-DORSAL PLOSIVES ; NON-DORSAL PLOSIVES
p / pʰ / t / tʰ ɾ / p / pʼ / pʰ / t / tʼ / tʰ ɾ /
; NON-DORSAL AFFRICATES ; NON-DORSAL AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; NON-DORSAL FRICATIVES ; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS ; NON-DORSAL NASALS
@ -523,7 +525,7 @@
; NON-LOW VOWELS ; NON-LOW VOWELS
i / u̟ / ʊ̞ / ɪ̞ / e / ə / ʌ i / u̟ / ʊ̞ / ɪ̞ / e / ə / ʌ
; NON-LOW DORSAL PLOSIVES ; NON-LOW DORSAL PLOSIVES
k / kʰ / k / kʼ / kʰ /
; NON-LOW DORSAL FRICATIVES ; NON-LOW DORSAL FRICATIVES
ç / x / ç / x /
; NON-LOW DORSAL NASAL OBSTRUENTS ; NON-LOW DORSAL NASAL OBSTRUENTS
@ -534,9 +536,9 @@
j j
; -- NON-DORSALS ; -- NON-DORSALS
; NON-DORSAL PLOSIVES ; NON-DORSAL PLOSIVES
p / pʰ / t / tʰ ɾ / p / pʼ / pʰ / t / tʼ / tʰ ɾ /
; NON-DORSAL AFFRICATES ; NON-DORSAL AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; NON-DORSAL FRICATIVES ; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS ; NON-DORSAL NASALS
@ -552,11 +554,11 @@
] ]
[back [back
+= +=
; k / ɣ / χ / u / ə / o / ʌ / ɑ ; k / kʼ / ɣ / χ / u / ə / o / ʌ / ɑ
; BACK VOWELS ; BACK VOWELS
ɑ / ɔ / ʌ / ʊ̞ / u̟ / ɑ / ɔ / ʌ / ʊ̞ / u̟ /
; BACK DORSAL PLOSIVES ; BACK DORSAL PLOSIVES
k / kʰ / k / kʼ / kʰ /
; BACK DORSAL FRICATIVES ; BACK DORSAL FRICATIVES
x / x /
; BACK DORSAL NASAL OBSTRUENTS ; BACK DORSAL NASAL OBSTRUENTS
@ -574,9 +576,9 @@
æ / e / ə / ɪ̞ / ɛ / i æ / e / ə / ɪ̞ / ɛ / i
; -- NON-DORSALS ; -- NON-DORSALS
; NON-DORSAL PLOSIVES ; NON-DORSAL PLOSIVES
p / pʰ / t / tʰ ɾ / p / pʼ / pʰ / t / tʼ / tʰ ɾ /
; NON-DORSAL AFFRICATES ; NON-DORSAL AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; NON-DORSAL FRICATIVES ; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS ; NON-DORSAL NASALS
@ -598,7 +600,7 @@
; NON-TENSE VOWELS ; NON-TENSE VOWELS
æ / ə / ɪ̞ / ɛ / ʌ / ʊ̞ / ɔ / æ / ə / ɪ̞ / ɛ / ʌ / ʊ̞ / ɔ /
; DORSAL PLOSIVES ; DORSAL PLOSIVES
k / kʰ / k / kʼ / kʰ /
; DORSAL FRICATIVES ; DORSAL FRICATIVES
ç / x / ç / x /
; DORSAL NASAL OBSTRUENTS ; DORSAL NASAL OBSTRUENTS
@ -609,9 +611,9 @@
j j
; -- NON-DORSALS ; -- NON-DORSALS
; NON-DORSAL PLOSIVES ; NON-DORSAL PLOSIVES
p / pʰ / t / tʰ ɾ / p / pʼ / pʰ / t / tʼ / tʰ ɾ /
; NON-DORSAL AFFRICATES ; NON-DORSAL AFFRICATES
tʃʰ / dʒ / tʃ / dʒ /
; NON-DORSAL FRICATIVES ; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS ; NON-DORSAL NASALS
@ -626,19 +628,21 @@
w w
] ]
; Devoicing, all our d's become t's
[+ voice]>[- voice]/._.
; Ejectivization, all our pits become pit's
[+ plosive]>[+ constricted-glottis]/._[+ constricted-glottis]
[+ plosive]>[+ constricted-glottis]/[+ constricted-glottis]_.
[+ constricted-glottis]>0/[+ constricted-glottis - continuant]_.
[+ constricted-glottis]>0/._[+ constricted-glottis - continuant]
*PROTO *PROTO
; -- Devoicing, all our z's become s's
[+ voice - continuant]>[- voice]/._.
; -- Reduction of schwa
ə>0/._.
|Gif Lang |Gif Lang
*PROTO *PROTO
; -- Ejectivization, all our pits become pit's
[+ spreadGlottis - continuant]>[+ constrictedGlottis - spreadGlottis]/._[+ constrictedGlottis]
[+ spreadGlottis - continuant]>[+ constrictedGlottis - spreadGlottis]/[+ constrictedGlottis]_.
[+ constrictedGlottis]>0/[+ constrictedGlottis - continuant]_.
[+ constrictedGlottis]>0/._[+ constrictedGlottis - continuant]
|Jif Lang |Jif Lang
/PROTO
/

View file

@ -13,13 +13,13 @@ import Latl from './components/Latl';
import LatlOutput from './components/LatlOutput'; import LatlOutput from './components/LatlOutput';
import { stateReducer } from './reducers/reducer'; import { stateReducer } from './reducers/reducer';
import { clearState } from './reducers/reducer.init'; import { clearState, waffleState } from './reducers/reducer.init';
const PhonoChangeApplier = () => { const PhonoChangeApplier = () => {
const [ state, dispatch ] = useReducer( const [ state, dispatch ] = useReducer(
stateReducer, stateReducer,
{}, {},
clearState waffleState
) )
const { lexicon, phones, phonemes, epochs, options, features, results, errors, latl, parseResults } = state; const { lexicon, phones, phonemes, epochs, options, features, results, errors, latl, parseResults } = state;

View file

@ -5,6 +5,7 @@ div.Features {
li { li {
display: grid; display: grid;
gap: 0.5em;
grid-template-columns: 10fr 10fr 1fr; grid-template-columns: 10fr 10fr 1fr;
margin: 0.5em 0; margin: 0.5em 0;
place-items: center center; place-items: center center;
@ -12,6 +13,7 @@ div.Features {
span.feature--names-and-phones { span.feature--names-and-phones {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
place-items: center center;
} }
span.feature-name { span.feature-name {

View file

@ -48,10 +48,8 @@ const SoundChangeSuite = props => {
list={`${epoch.name}-parents-list`} list={`${epoch.name}-parents-list`}
value={epoch.parent || 'none'} value={epoch.parent || 'none'}
onChange={e=>changeHandler( onChange={e=>changeHandler(
e, ()=>{ e, ()=>setEpoch({...epoch, parent:e.target.value})
console.log(e.target.value) )
setEpoch({...epoch, parent:e.target.value})
})
} }
> >
{parentsOptions()} {parentsOptions()}

View file

@ -19,6 +19,20 @@ export const clearState = () => {
} }
} }
export const waffleState = () => {
return {
epochs: [],
phones: {},
options: { output: 'default', save: false },
results: [],
errors: {},
features: {},
lexicon: [],
latl: waffleLatl,
parseResults: ''
}
}
export const initState = (changesArgument: number): stateType => { export const initState = (changesArgument: number): stateType => {
const state = { const state = {
epochs: [ epochs: [
@ -106,3 +120,620 @@ export const initState = (changesArgument: number): stateType => {
return state; return state;
} }
const waffleLatl = `
; -------- main class features
[consonantal
+=
; PLOSIVES
p / pʼ / / t / tʼ / ɾ / k / kʼ / /
; AFFRICATES
/ /
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; NASALS
m ɱ / n / ŋ /
; LIQUIDS + RHOTICS
l / ɹ ɹʲ ɹˤ /
; SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
-=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; GLIDES
j / w /
; LARYNGEALS
h ɦ / ʔ
]
[sonorant
+=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; GLIDES
j / w w̥ /
; LIQUIDS + RHOTICS
l / ɹ ɹʲ ɹˤ /
; NASALS
m ɱ / n / ŋ /
; SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
-=
; PLOSIVES
p / pʼ / / t / tʼ / ɾ / k / kʼ / /
; AFFRICATES
/ /
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; LARYNGEALS
h ɦ / ʔ
]
[approximant
+=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; LIQUIDS + RHOTICS
l / ɹ ɹʲ ɹˤ /
; GLIDES
j / w /
; SYLLABIC LIQUIDS
l̩ / ɹ̩
-=
; PLOSIVES
p / pʼ / / t / tʼ / ɾ / k / kʼ / /
; AFFRICATES
/ /
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; NASALS
m ɱ / n / ŋ /
; SYLLABIC NASALS
m̩ / n̩
]
; -------- laryngeal features
[voice
+=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; GLIDES
j / w /
; LIQUIDS + RHOTICS
l / ɹ ɹʲ ɹˤ /
; NASALS
m ɱ / n / ŋ /
; SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩ /
; VOICED FRICATIVES
v / ð / z / ʒ /
; VOICED AFFRICATES
/
; VOICED LARYNGEALS
; LARYNGEALS
ɦ
-= voiceless obstruents
; PLOSIVES
p / pʼ / / t / tʼ / ɾ / k / kʼ / /
; VOICELESS AFFRICATES
/ /
; VOICELESS FRICATIVES
f / θ / s / ʃ / ç / x /
; VOICELESS LARYNGEALS
h / ʔ
]
[spreadGlottis
+=
; ASPIRATED PLOSIVES
/ / /
; ASPIRATED AFFRICATES
/
; SPREAD LARYNGEALS
h ɦ
-=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; UNASPIRATED PLOSIVES
p / pʼ / t / tʼ / ɾ / k / kʼ /
; UNASPIRATED AFFRICATES
/ /
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; NASAL OBSTRUENTS
m ɱ / n / ŋ /
; LIQUIDS + RHOTICS
l / ɹ ɹʲ ɹˤ /
; SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩ /
; GLIDES
j / w
; CONSTRICTED LARYNGEALS
ʔ
]
[constrictedGlottis
+=
; LARYNGEALIZED RHOTIC
ɹˤ /
; CONSTRICTED LARYNGEAL
ʔ /
; EJECTIVE PLOSIVES
pʼ / tʼ / kʼ
-=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; PLOSIVES
p / / t / ɾ / k / /
; AFFRICATES
/ /
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; NASAL OBSTRUENTS
m ɱ / n / ŋ /
; LIQUIDS
l /
; NON-PHARYNGEALIZED RHOTICS
ɹ ɹʲ /
; SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
; GLIDES
j / w
; SPREAD LARYNGEALS
h ɦ /
]
; -------- manner features
[continuant
+=
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; LIQUIDS + RHOTICS
l / ɹ ɹʲ ɹˤ /
; GLIDES
j / w /
; SYLLABIC LIQUIDS
l̩ / ɹ̩ /
; TAPS
ɾ
-=
; NON-TAP PLOSIVES
p / pʼ / / t / tʼ / / k / kʼ / /
; AFFRICATES
/ /
; NASALS
m ɱ / n / ŋ /
; SYLLABIC NASALS
m̩ / n̩
]
[nasal
+=
; NASALS
m ɱ / n / ŋ /
; SYLLABIC NASALS
m̩ / n̩
-=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x /
; LIQUIDS + RHOTICS
l / ɹ ɹʲ ɹˤ /
; GLIDES
j / w /
; SYLLABIC LIQUIDS
l̩ / ɹ̩ /
; PLOSIVES
p / pʼ / / t / tʼ / ɾ / k / kʼ / /
; AFFRICATES
/ /
]
[strident
+=
; STRIDENT FRICATIVES
f / v / s / z / ʃ / ʒ /
; STRIDENT AFFRICATES
/
-=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; PLOSIVES
p / pʼ / / t / tʼ / ɾ / k / kʼ / /
; NON-STRIDENT FRICATIVES
θ / ð / ç / x /
; NASAL OBSTRUENTS
m ɱ / n / ŋ /
; RHOTICS + LIQUIDS
l / ɹ ɹʲ ɹˤ /
; SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩ /
; GLIDES
j / w
]
[lateral
+=
; LATERAL LIQUIDS
l /
; SYLLABIC LATERALS /
l̩
-=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; PLOSIVES
p / pʼ / / t / tʼ / ɾ / k / kʼ /
; AFFRICATES
/
; FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ / ç / x
; NASAL OBSTRUENTS
m ɱ / n / ŋ
; RHOTIC LIQUIDS
ɹ ɹʲ ɹˤ
; NON-LIQUID SYLLABIC CONSONANTS
m̩ / n̩ / ɹ̩
; GLIDES
j / w
]
; -------- ---- PLACE features
; -------- labial features
[labial
+=
; ROUNDED VOWELS
u̟ / ʊ̞ / ɔ /
; LABIAL PLOSIVES
p / pʼ / /
; LABIAL FRICATIVES
f / v /
; LABIAL NASALS
m ɱ /
; LABIAL SYLLABIC CONSONANTS
m̩ /
; LABIAL GLIDES
w
-=
; UNROUNDED VOWELS
æ / e / ə / ɑ / ɪ̞ / ɛ / ʌ / i /
; NON-LABIAL PLOSIVES
t / tʼ / ɾ / k / kʼ / /
; NON-LABIAL AFFRICATES
/ /
; NON-LABIAL FRICATIVES
θ / ð / s / z / ʃ / ʒ / ç / x /
; NON-LABIAL NASAL OBSTRUENTS
n / ŋ /
; LIQUIDS
l /
; RHOTIC LIQUIDS
ɹ ɹʲ ɹˤ /
; NON-LABIAL SYLLABIC CONSONANTS
n̩ / l̩ / ɹ̩ /
; NON-LABIAL GLIDES
j
]
; -------- coronal features
[coronal
+=
; CORONAL PLOSIVES
t / tʼ / ɾ /
; CORONAL AFFRICATES
/ /
; CORONAL FRICATIVES
θ / ð / s / z / ʃ / ʒ /
; CORONAL NASALS
n /
; CORONAL LIQUIDS
l
; CORONAL RHOTIC LIQUIDS
ɹ
; CORONAL SYLLABIC CONSONANTS
n̩ / l̩ / ɹ̩
-=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; NON-CORONAL PLOSIVES
p / pʼ / / k / kʼ /
; NON-CORONAL FRICATIVES
f / v / ç / x
; NON-CORONAL NASAL OBSTRUENTS
m ɱ / ŋ
; NON-CORONAL RHOTIC LIQUIDS
ɹʲ ɹˤ
; NON-CORONAL SYLLABIC CONSONANTS
m̩ /
; NON-CORONAL GLIDES
j / w
]
[anterior
+=
; ALVEOLAR PLOSIVES
t / tʼ / ɾ /
; ALVEOLAR AFFRICATES
/ /
; DENTAL FRICATIVES
θ / ð /
; ALVEOLAR FRICATIVES
s / z /
; ALVEOLAR NASALS
n /
; ALVEOLAR LIQUIDS
l
; ALVEOLAR SYLLABIC CONSONANTS
n̩ / l̩ /
-=
; POSTALVEOLAR FRICATIVES
ʃ / ʒ /
; POSTALVEOLAR RHOTIC LIQUIDS
ɹ /
; POSTALVEOLAR SYLLABIC CONSONANTS
ɹ̩ /
; -- NON-CORONALs
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; NON-CORONAL PLOSIVES
p / pʼ / / k / kʼ /
; NON-CORONAL FRICATIVES
f / v / ç / x
; NON-CORONAL NASAL OBSTRUENTS
m ɱ / ŋ
; NON-CORONAL RHOTIC LIQUIDS
ɹʲ ɹˤ
; NON-CORONAL SYLLABIC CONSONANTS
m̩ /
; NON-CORONAL GLIDES
j / w
]
[distributed
+=
; DENTAL FRICATIVES
θ / ð /
; POSTALVEOLAR FRICATIVES
ʃ / ʒ /
; POSTALVEOLAR RHOTIC LIQUIDS
ɹ /
; POSTALVEOLAR SYLLABIC CONSONANTS
ɹ̩ /
-=
; apical / retroflex
; ALVEOLAR PLOSIVES
t / tʼ / ɾ /
; ALVEOLAR FRICATIVES
s / z /
; ALVEOLAR NASALS
n /
; ALVEOLAR LIQUIDS
l
; ALVEOLAR SYLLABIC CONSONANTS
n̩ / l̩ /
; -- NON-CORONALS
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; NON-CORONAL PLOSIVES
p / pʼ / / k / kʼ /
; NON-CORONAL FRICATIVES
f / v / ç / x
; NON-CORONAL NASAL OBSTRUENTS
m ɱ / ŋ
; NON-CORONAL RHOTIC LIQUIDS
ɹʲ ɹˤ
; NON-CORONAL SYLLABIC CONSONANTS
m̩ /
; NON-CORONAL GLIDES
j / w
]
; -------- dorsal features
[dorsal
+=
; VOWELS
æ / e / ə / ɑ / ɔ / ɪ̞ / ɛ / ʌ / ʊ̞ / i / u̟ /
; DORSAL PLOSIVES
k / kʼ / /
; DORSAL FRICATIVES
ç / x /
; DORSAL NASAL OBSTRUENTS
ŋ /
; DORSAL RHOTIC LIQUIDS
ɹʲ ɹˤ
; DORSAL GLIDES
j
-=
; NON-DORSAL PLOSIVES
p / pʼ / / t / tʼ / ɾ /
; NON-DORSAL AFFRICATES
/ /
; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS
m ɱ / n /
; NON-DORSAL LIQUIDS
l
; NON-DORSAL RHOTIC LIQUIDS
ɹ
; NON-DORSAL SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
; NON-DORSAL GLIDES
w
]
[high
+=
; HIGH VOWELS
i / u̟ / ʊ̞ / ɪ̞
; HIGH DORSAL PLOSIVES
k / kʼ / /
; HIGH DORSAL FRICATIVES
ç / x /
; HIGH DORSAL NASAL OBSTRUENTS
ŋ /
; HIGH RHOTIC LIQUIDS
ɹʲ
; HIGH DORSAL GLIDES
j / w
-= χ / e / o / a
; NON-HIGH VOWELS
ɑ / æ / e / ə / ɛ / ʌ
; NON-HIGH RHOTIC LIQUIDS
ɹˤ
; -- NON-DORSALS
; NON-DORSAL PLOSIVES
p / pʼ / / t / tʼ / ɾ /
; NON-DORSAL AFFRICATES
/ /
; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS
m ɱ / n /
; NON-DORSAL LIQUIDS
l
; NON-DORSAL RHOTIC LIQUIDS
ɹ
; NON-DORSAL SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
; NON-DORSAL GLIDES
w
]
[low
+=
; LOW VOWELS
ɑ / æ / ɛ /
; LOW DORSAL RHOTIC LIQUIDS
ɹˤ
-= a / ɛ / ɔ
; NON-LOW VOWELS
i / u̟ / ʊ̞ / ɪ̞ / e / ə / ʌ
; NON-LOW DORSAL PLOSIVES
k / kʼ / /
; NON-LOW DORSAL FRICATIVES
ç / x /
; NON-LOW DORSAL NASAL OBSTRUENTS
ŋ /
; NON-LOW DORSAL RHOTIC LIQUIDS
ɹʲ
; DORSAL GLIDES
j
; -- NON-DORSALS
; NON-DORSAL PLOSIVES
p / pʼ / / t / tʼ / ɾ /
; NON-DORSAL AFFRICATES
/ /
; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS
m ɱ / n /
; NON-DORSAL LIQUIDS
l
; NON-DORSAL RHOTIC LIQUIDS
ɹ
; NON-DORSAL SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
; NON-DORSAL GLIDES
w
]
[back
+=
; BACK VOWELS
ɑ / ɔ / ʌ / ʊ̞ / u̟ /
; BACK DORSAL PLOSIVES
k / kʼ / /
; BACK DORSAL FRICATIVES
x /
; BACK DORSAL NASAL OBSTRUENTS
ŋ /
; BACK DORSAL RHOTIC LIQUIDS
ɹˤ
-=
; NON-BACK DORSAL FRICATIVES
ç /
; NON-BACK DORSAL RHOTIC LIQUIDS
ɹʲ
; NON-BACK DORSAL GLIDES
j
; NON-BACK VOWELS
æ / e / ə / ɪ̞ / ɛ / i
; -- NON-DORSALS
; NON-DORSAL PLOSIVES
p / pʼ / / t / tʼ / ɾ /
; NON-DORSAL AFFRICATES
/ /
; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS
m ɱ / n /
; NON-DORSAL LIQUIDS
l
; NON-DORSAL RHOTIC LIQUIDS
ɹ
; NON-DORSAL SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
; NON-DORSAL GLIDES
w
]
[tense ; compare to ATR or RTR
+=
; TENSE VOWELS
e / i / u̟ / ɑ
-=
; NON-TENSE VOWELS
æ / ə / ɪ̞ / ɛ / ʌ / ʊ̞ / ɔ /
; DORSAL PLOSIVES
k / kʼ / /
; DORSAL FRICATIVES
ç / x /
; DORSAL NASAL OBSTRUENTS
ŋ /
; DORSAL RHOTIC LIQUIDS
ɹʲ ɹˤ /
; DORSAL GLIDES
j
; -- NON-DORSALS
; NON-DORSAL PLOSIVES
p / pʼ / / t / tʼ / ɾ /
; NON-DORSAL AFFRICATES
/ /
; NON-DORSAL FRICATIVES
f / v / θ / ð / s / z / ʃ / ʒ /
; NON-DORSAL NASALS
m ɱ / n /
; NON-DORSAL LIQUIDS
l
; NON-DORSAL RHOTIC LIQUIDS
ɹ
; NON-DORSAL SYLLABIC CONSONANTS
m̩ / n̩ / l̩ / ɹ̩
; NON-DORSAL GLIDES
w
]
*PROTO
; -- Devoicing, all our z's become s's
[+ voice - continuant]>[- voice]/._.
; -- Reduction of schwa
ə>0/._.
|Gif Lang
*PROTO
; -- Ejectivization, all our pits become pit's
[+ spreadGlottis - continuant]>[+ constrictedGlottis - spreadGlottis]/._[+ constrictedGlottis]
[+ spreadGlottis - continuant]>[+ constrictedGlottis - spreadGlottis]/[+ constrictedGlottis]_.
[+ constrictedGlottis]>0/[+ constrictedGlottis - continuant]_.
[+ constrictedGlottis]>0/._[+ constrictedGlottis - continuant]
|Jif Lang
`

View file

@ -170,6 +170,9 @@ const parsePhone = (tree, token, index, tokens) => {
tree[tree.length - 1] = {...lastNode, value: lastNode.value + token.value } tree[tree.length - 1] = {...lastNode, value: lastNode.value + token.value }
return tree; return tree;
} }
case 'ruleSet': {
return [...tree, { type: 'rule', value: token.value }]
}
case 'feature--plus': case 'feature--plus':
lastNode.positivePhones = [...lastNode.positivePhones, token.value ]; lastNode.positivePhones = [...lastNode.positivePhones, token.value ];
tree[tree.length - 1] = lastNode; tree[tree.length - 1] = lastNode;
@ -449,7 +452,6 @@ export const buildTree = tokens => {
features: [], features: [],
lexicon: [] lexicon: []
} }
console.log(tokens)
const nodes = tokens.reduce(addToken, []); const nodes = tokens.reduce(addToken, []);
// return nodes // return nodes
const tree = nodes.reduce(connectNodes, bareTree); const tree = nodes.reduce(connectNodes, bareTree);

View file

@ -32,6 +32,7 @@ const findFeaturesFromLexeme = (phones: {}, lexeme:string): [] => {
let lastIndex = lexeme.length - 1; let lastIndex = lexeme.length - 1;
let node = {}; let node = {};
[...lexeme].forEach((graph, index) => { [...lexeme].forEach((graph, index) => {
try {
if (!index ) return node = phones[graph] if (!index ) return node = phones[graph]
if (index === lastIndex) return node[graph] if (index === lastIndex) return node[graph]
? featureBundle.push(node[graph]) ? featureBundle.push(node[graph])
@ -40,8 +41,12 @@ const findFeaturesFromLexeme = (phones: {}, lexeme:string): [] => {
featureBundle.push(node) featureBundle.push(node)
return node = phones[graph] return node = phones[graph]
} }
if (!node[graph]) if (!node) return node = phones[graph]
return node = node[graph] return node = node[graph]
}
catch (e) {
throw {e, 'phones[graph]':phones[graph], index, lexeme }
}
}) })
return featureBundle; return featureBundle;
} }