simple_ipa.matzo 444 B

12345678910111213141516171819202122
  1. cons := "p" | "t" | "k"
  2. | "m" | "n" | "ŋ"
  3. | "s" | "ʃ" | "ɾ";
  4. vowel ::= a i u;
  5. rime := 4: <vowel> | <vowel, "ʔ">;
  6. syll := tuple/flatten[cons, rime];
  7. word := tuple/flatten[tuple/rep[2..4, syll]];
  8. orthography := {
  9. ["ʃ"] => "sh";
  10. ["ŋ"] => "ng";
  11. ["ɾ"] => "r";
  12. ["ʔ"] => "'";
  13. [ch] => ch
  14. };
  15. fix word;
  16. ortho := tuple/join[tuple/map[orthography, word]];
  17. ipa := tuple/join[word];
  18. puts ortho " (pronounced /ˈ" ipa "/)";