Quantcast
Channel: SIL Language Software Community - Latest topics
Viewing all articles
Browse latest Browse all 649

How can I store diphthong vowel?

$
0
0

Hello!
Right now I’m creating keyboard for a tonal language but I’m new to the Keyman Developer program. So I asked AI(s) for help in creating rules.

Here is the context.

“a” + “b” > “ā”
“a” + “d” > “ǎ”
“a” + “g” > “ä”
“a” + “j” > “à”
“a” + “m” > “ã”
“a” + “s” > “â”
“a” + “v” > “á”
“e” + “b” > “ē”
“e” + “d” > “ě”
“e” + “g” > “ë”
“e” + “j” > “è”
“e” + “m” > “ẽ”
“e” + “s” > “ê”
“e” + “v” > “é”
“i” + “b” > “ī”
“i” + “d” > “ǐ”
“i” + “g” > “ï”
“i” + “j” > “ì”
“i” + “m” > “ĩ”
“i” + “s” > “î”
“i” + “v” > “í”
“o” + “b” > “ō”
“o” + “d” > “ǒ”
“o” + “g” > “ö”
“o” + “j” > “ò”
“o” + “m” > “õ”
“o” + “s” > “ô”
“o” + “v” > “ó”
“u” + “b” > “ū”
“u” + “d” > “ǔ”
“u” + “g” > “ü”
“u” + “j” > “ù”
“u” + “m” > “ũ”
“u” + “s” > “û”
“u” + “v” > “ú”
“w” + “b” > “w̄”
“w” + “d” > “w̌”
“w” + “g” > “ẅ”
“w” + “j” > “ẁ”
“w” + “m” > “w̃”
“w” + “s” > “ŵ”
“w” + “v” > “ẃ”

So far, it’s doing super well. “for single vowel with diacritic”

(Rules created by AI)
store(tones) ‘bdgjmsv’
store(vowels) ‘aeiouw’
store(output) ‘̄̌̈̀̃̂́’ c Corresponding tone marks for each tone in ‘tones’

c General rule to combine vowels with tones using index lookup
any(vowels) + any(tones) > context index(output, 1)

But I’m struggling to make diphthong vowels work. I tried to apply the rule from the AI above, but I don’t know how to store diphthong vowels. I want to do something bellow this, but the problem is that space also counts as a character. So, the rules did not work correctly.

store(tones) ‘bdgjmsv’
store(vowels) ‘ai au aw’
store(output) ‘̄̌̈̀̃̂́’ c Corresponding tone marks for each tone in ‘tones’
c General rule to combine vowels with tones using index lookup
any(vowels) + any(tones) > context index(output, 1)

(diacritics should go to the first vowel).
“ai” + “b” > “āi”
“ai” + “d” > “ǎi”
“ai” + “g” > “äi”
“ai” + “j” > “ài”
“ai” + “m” > “ãi”
“ai” + “s” > “âi”
“ai” + “v” > “ái”
“au” + “b” > “āu”
“au” + “d” > “ǎu”
“au” + “g” > “äu”
“au” + “j” > “àu”
“au” + “m” > “ãu”
“au” + “s” > “âu”
“au” + “v” > “áu”
“aw” + “b” > “āw”
“aw” + “d” > “ǎw”
“aw” + “g” > “äw”
“aw” + “j” > “àw”
“aw” + “m” > “ãw”
“aw” + “s” > “âw”
“aw” + “v” > “áw”

Thank you in advance! _/||_

8 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 649

Trending Articles