Commits

Daniel Lyons committed 47bfe4f

initial import

  • Participants

Comments (0)

Files changed (4)

+syntax: glob
+*~
+:- module(phono).
+
+manner(stop).
+manner(nasal).
+manner(fricative).
+manner(sibilant).
+manner(lateral).
+manner(affricate).
+manner(flap).
+manner(trill).
+manner(approximant).
+
+passive_place(labial).
+passive_place(dental).
+passive_place("dental-alveolar").
+passive_place(alveolar).
+passive_place("post-alveolar").
+passive_place(palatal).
+passive_place(velar).
+passive_place(uvular).
+passive_place(pharyngeal).
+passive_place(epiglottal).
+
+active_place(labial).
+active_place(apical).
+active_place(laminal).
+active_place(subapical).
+active_place(dorsal).
+active_place(radical).
+active_place(epiglottal).
+active_place(larynx).
+active_place(glottis).
+
+place(retroflex).
+place(X) :- passive_place(X).
+place(X) :- active_place(X).
+
+phonation(voiceless).
+phonation(voiced).
+phonation(creaky).
+
+nasality(nasal).
+nasality(oral).
+
+exit(central).
+exit(lateral).
+exit(na).
+
+airstream(pulmonic).
+airstream("glottalic egressive").
+airstream("glottal ingressive").
+airstream("lingual ingressive").
+
+% consonant(IPA, ArticulationManner, ArticulationPlace, Phonation, Nasality, Exit, AirstreamMechanism)
+
+consonant(ʈ, stop, retroflex, voiceless, oral, na, pulmonic).
+consonant(z, sibilant, alveolar, voiced, oral, central, pulmonic).
+:- module(syllab).
+
+stop(p).
+approximant(l).
+vowel(a).
+
+consonant(C) --> [C], { stop(C) }.
+consonant(C) --> [C], { approximant(C) }.
+vowel(V) --> [V], { vowel(V) }.
+
+syllable(S) --> syllable1(Chars), { atom_chars(S, Chars) }.
+
+syllable1([O|Body]) --> onset(O), syllable_body(Body).
+syllable1(Body) --> syllable_body(Body).
+
+syllable_body([N|C]) --> nucleus(N), coda(C).
+syllable_body([N]) --> nucleus(N).
+
+onset(C) --> consonant(C), { C \= ng }.
+
+nucleus(V) --> vowel(V).
+
+coda([C]) --> consonant(C).
+:- module(tokipona).
+
+syllable_structure("(C)V(N)").
+
+consonant(m, nasal, labial).
+consonant(n, nasal, coronal).
+consonant(p, plosive, labial).
+consonant(t, plosive, coronal).
+consonant(k, plosive, dorsal).
+consonant(s, fricative, coronal).
+consonant(w, approximant, labial).
+consonant(l, approximant, coronal).
+consonant(j, approximant, dorsal).
+
+vowel(a).
+vowel(e).
+vowel(i).
+vowel(o).
+vowel(u).
+
+
+consonant1(C) --> [C], { consonant(C, _, _) }.
+vowel(V) --> [V], { vowel(V) }.
+nasal(N) --> [N], { consonant1(N, nasal, _) }.
+
+syllable(S) --> syllable1(Chars), { atom_chars(S, Chars) }.
+
+syllable1([C|S]) --> consonant1(C), syllable_body(S).
+syllable1(S) --> syllable_body(S).
+
+syllable_body([V,N]) --> vowel(V), nasal(N).
+syllable_body([V]) --> vowel(V).
+
+word(Word) --> syllable(Word).
+word(Word) --> syllable(W), word(W1), { atom_concat(W, W1, Word) }.