Module:anui-headword: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 15: Line 15:
return "[[wikt:Appendix:Glossary#" .. entry .. "|" .. text .. "]]"
return "[[wikt:Appendix:Glossary#" .. entry .. "|" .. text .. "]]"
end
end
local consonant = "[ǃǂǁʘʼʇxqrʛɴɬšṣschjklmptŋṉṭṯ]"
local vowel = "[aeiouàèìòùʼãĩõũḛḭṵ" .. TILDEB .. "]"


local function m(word)
local function m(word)
-- as in [[Module:anui-pron]], account for syllabic m
-- as in [[Module:anui-pron]], account for syllabic m
word = word:gsub("([uùm]ʼ?)m", "%1ᴍ")
--[[word = word:gsub("([uùm]ʼ?)m", "%1ᴍ")
word = word:gsub("m(ʼᴍ)", "ᴍ%1")
word = word:gsub("m(ʼᴍ)", "ᴍ%1")
word = word:gsub("([aeiouàèìòù])m", "%1ᴍ")
word = word:gsub("([aeiouàèìòù])m", "%1ᴍ")
word = word:gsub("([aeiouàèìòù])ᴍ([aeiou])", "%1m%2")
word = word:gsub("([aeiouàèìòù])ᴍ([aeiou])", "%1m%2")]]
word = word:gsub("mʼm", "ṵʼũ"); word = word:gsub("(" .. vowel .. ")m", "%1ũ")
return word
return word
Line 28: Line 33:
local function redup(word)
local function redup(word)
word = m(word)
word = m(word)
 
local consonant = "[ǃǂǁʘʼʇxqrʛɴɬšṣschjklmptŋṉṭṯ]"
local vowel = "[aeiouàèìòùʼãĩõᴍ" .. TILDEB .. "]"
-- CV > C₁(v)C₂V
-- CV > C₁(v)C₂V
local C = match(word, "^" .. vowel .. "?(" .. consonant .. "*)")
local C = match(word, "^" .. vowel .. "?(" .. consonant .. "*)")