Re: PEG Morphology Algorithm
I'm implementing stress marking as follows:
1- Commas are ignored always. So for example BRAli,e is identical to BRAlie and is a valid fuhivla.
2- Case of all consonants is ignored. BRoDa = broda
3- Case is ignored in both cmene and cmavo, because stress is irrelevant for them. {PApiPEtis} is a valid cmene and {la'E'Au} is a valid cmavo form.
4- iV, uV, ai, au, ei, oi are the only vowel pairs allowed. Other sequences give "no-lojban-word". Strings like aiaueiaii are allowed as long as every adjacent pair in them is allowed.
5- Vowel strings are broken in pairs from the left for purposes of counting syllables: ai-au-ei-ai-i has five syllables.
6- Stress on a diphthong is shown by capitalizing the first vowel in ai, au, ei, oi, and the second vowel in iV, uV. The other member of the diphthong is treated as a consonant, i.e. its case is ignored. {Ia} is considered an unstressed syllable, just like {Ba}. {iA} is stressed, like {bA}.
7- Words with wrong stress patterns such as {broDA} or {brIvlA} produce "non-lojban-word".
Comments?
mu'o mi'e xorxes