PROLOG Every syllable of Senufo (a Niger - Kongo language spoken in the Ivory Co
ID: 3665548 • Letter: P
Question
PROLOG
Every syllable of Senufo (a Niger-Kongo language spoken in the Ivory Coast, Burkina Faso, and Mali), consists solely of an onset and a nucleus. Write a PROLOG program that will generate the syllables of Senufo. You may assume that the onsets of Senufo contain single consonants p, t,k and that its nuclei contain single vowels a, e, i, o, u. Use natural properties. Include some output from your program. [Hint: Assume that the phones of Senufo are just p, t,k, a, e, i, o, u, so you may want to use a different phones program here]
Explanation / Answer
% senufophone.swipl
phone(p).
phone(t).
phone(k).
phone(a).
phone(e).
phone(i).
phone(o).
phone(u). % senufoproperties.swipl :- ['senufophone.swipl'].
cns(p).
cns(t).
cns(k). % senufosyllable.swipl :- ['senufoproperties.swipl']. syllable(A):- onset(B), rhyme(C), append(B,C,A).
/** An onset and a rhyme is a syllable **/ onset([A]):- phone(A),cns(A). /** p,t,k are onsets **/ rhyme(C):- nucleus(A), coda(B), append(A,B,C).
3
/** A nucleus and a coda is a rhyme **/ nucleus([A]):- phone(A),not(cns(A)).
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.