Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 17: Line 17:


--obsolete ligatures and L with stroke used to remove two-character hassle. will replace later
--obsolete ligatures and L with stroke used to remove two-character hassle. will replace later
local consonant = "[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦʔƀꝺđɣꬶɉ]" .. UNRELEASED .. "?"
local consonant = "[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦʔƀꝺđɣꬶɉɨ]" .. UNRELEASED .. "?"
local front_vowel = "iɪyeøɛœæa"
local front_vowel = "iɪyeøɛœæa"
local back_vowel = "uɔ" .. NASALIZED .. "?ɑʊɤ"
local back_vowel = "uɔ" .. NASALIZED .. "?ɑʊɤ"
local vowel = "[" .. front_vowel .. back_vowel .. "ɨ]"
local vowel = "[" .. front_vowel .. back_vowel .. "]"


local spat1 = "(·?ˈ[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦ⁽ʰ⁾ʔːƀꝺđɣꬶɉ]*"..UNRELEASED.."?"..vowel..")(h)([^ː])"
local spat1 = "(·?ˈ[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦ⁽ʰ⁾ʔːƀꝺđɣꬶɉ]*"..UNRELEASED.."?"..vowel..")(h)([^ː])"
Line 88: Line 88:
}
}


local rules = {
local rules1 = {
{".", {
{".", {
["ḍ"] = "ð", ["ṡ"] = "ɕ",
["ḍ"] = "ð", ["ṡ"] = "ɕ",
Line 127: Line 127:
}
}


local final_rules = {
local rules2 = {
-- stressed consonants (coda of stressed syllables without long vowels, diphthongs, or triphthongs)
-- stressed consonants (coda of stressed syllables without long vowels, diphthongs, or triphthongs)
{spat1, "%1ʔ%3"}, {spat2, "%1k%3"}, {spat3, "%1p%3"}, {spat4, "%1t%3"}, {spat5, "%1ð%3"},
{spat1, "%1ʔ%3"}, {spat2, "%1k%3"}, {spat3, "%1p%3"}, {spat4, "%1t%3"}, {spat5, "%1ð%3"},
Line 147: Line 147:
{"(ꬶ[msɕ])", "%1ː"}, {"ꬶsꬶ", "kskː"}, {"ꬶsl", "ksł"},
{"(ꬶ[msɕ])", "%1ː"}, {"ꬶsꬶ", "kskː"}, {"ꬶsl", "ksł"},
{"ɣ([mn])", "ŋ%1ː"}, {"ɣ([vsl])", "k%1"},
{"ɣ([mn])", "ŋ%1ː"}, {"ɣ([vsl])", "k%1"},
 
-- closed vowels
-- closed vowels
{"(" .. vowel .. "*)(" .. consonant .. consonant .. ")", function(s1, s2) return open_to_closed(s1) .. s2 end},
{"(" .. vowel .. "*)(" .. consonant .. consonant .. ")", function(s1, s2) return open_to_closed(s1) .. s2 end},
Line 166: Line 166:
term=export.morphemes(term)
term=export.morphemes(term)
for _, rule in ipairs(rules) do
for _, rule in ipairs(rules1) do
term = gsub(term, rule[1], rule[2])
term = gsub(term, rule[1], rule[2])
end
end
Line 183: Line 183:
end
end
for _, final_rule in ipairs(final_rules) do
for _, rrule in ipairs(rules2) do
term = gsub(term, final_rule[1], final_rule[2])
term = gsub(term, rrule[1], rrule[2])
end
end
Line 192: Line 192:
term = gsub(term, "ü", "œ")
term = gsub(term, "ü", "œ")
end
end
return term
return term