Open elsanussi-s-mneina opened 4 years ago
Some parser combinators are in the PrimitiveParsers module (PrimitiveParsers.hs), but so far they are only used to split text by phoneme. I'm not sure if there is a context free grammar for IPA. I would need to find out what the constraints are for which diacritic comes before the other to do it right. We may have to add a stage in between where we reorder diacritics because it is unlikely that linguists always type the diacritics in a particular order.
The constructIPA, and analyzeIPA functions are difficult to extend to handle new diacritics. Not only, does the programmer have to add code in both functions when adding support for each diacritic, the exact location in the code where the condition is added is crucial to getting it right. There are most likely better ways to do this. Specifically: improving the task of converting a string of characters to a phoneme, and back. Suggestion: context free grammars, or parser combinators