Module:snon-mut: Difference between revisions

Melinoë (talk | contribs)
No edit summary
Melinoë (talk | contribs)
No edit summary
Line 39: Line 39:
data.is_uppercase = term_lower ~= term
data.is_uppercase = term_lower ~= term
local normalized = toNFD(term_lower)
local normalized = toNFD(term_lower)
data.vowel = normalized:match("^[aeiou]") and true or false
data.vowel = normalized:match("^[aeiouwy]") and true or false
if data.vowel then
if data.vowel then
data.final = term_lower
data.final = term_lower
if not (normalized:match("^i[aeiou]")) then
-- H-prothesis, unless initial "w" is a semivowel (followed by a vowel other than "y", or "y" with a diacritic).
data.mut1 = "gh-"
if not (normalized:match("^w[aeiouw]") or umatch(normalized, "^wy[" .. GRAVE .. ACUTE .. CIRC .. DIAER .. "]")) then
data.mut2 = "n-"
data.mut3 = "h"
data.mut3 = "h-"
end
end
return data
return data