এই মডিউলের জন্য মডিউল:kl-pron/নথি-এ নথিপত্র তৈরি করা হয়ে থাকতে পারে

local export = {}

-- This _unfinished_ module generates IPA for [[Template:kl-IPA]]. It works by a series of substitutions.

pagename = mw.title.getCurrentTitle().subpageText
subst = mw.ustring.gsub

export.get_phonetic = function(frame)

ipa = pagename

ipa = subst(ipa, "b", "p")
ipa = subst(ipa, "d", "t")
ipa = subst(ipa, "([tsnlTSNL])u([tsnlTSNL])", "%1ʉ%2") -- u is fronted between alveolars
ipa = subst(ipa, "([tsnlTSNL])uu([tsnlTSNL])", "%1ʉː%2")
ipa = subst(ipa, "ii([pfmvPFMV])", "yː%1") -- [[Siimut]], [[Siiva]], [[aaffarmiippoq]]
ipa = subst(ipa, "i([pfmvPFMV])", "y%1") -- i is rounded before labials
ipa = subst(ipa, "aa([qrQR])", "ɑː%1")
ipa = subst(ipa, "a([qrQR])", "ɑ%1") -- a is retracted before uvulars
ipa = subst(ipa, "rv", "rf") -- Does the string "rrv" occur?
ipa = subst(ipa, "ll", "ɬː")
ipa = subst(ipa, "gg", "çː")
ipa = subst(ipa, "rr", "χː")
ipa = subst(ipa, "nng", "ŋː")
ipa = subst(ipa, "ng", "ŋ") -- Always?
ipa = subst(ipa, "g", "ɣ") -- And I suppose sometimes it's [k], but I cannot distinguish between these.
ipa = subst(ipa, "r", "ʁ")
ipa = subst(ipa, "rn", "ɴ") -- Are there words with the string "rng"?
ipa = subst(ipa, "t([iey])", "t͡s%1") -- Correct?

ipa = subst(ipa, "aa", "aː") -- Probably an easier way than doing this for each character.
ipa = subst(ipa, "ee", "eː")
ipa = subst(ipa, "ii", "iː")
ipa = subst(ipa, "oo", "oː")
ipa = subst(ipa, "uu", "uː")

ipa = subst(ipa, "ff", "fː")
ipa = subst(ipa, "kk", "kː")
ipa = subst(ipa, "mm", "mː")
ipa = subst(ipa, "nn", "nː")
ipa = subst(ipa, "pp", "pː")
ipa = subst(ipa, "ss", "sː")

-- Anything else?

return ipa

end

export.get_phonemic = function(frame)

ipa = pagename

ipa = subst(ipa, "[ei]", "i")
ipa = subst(ipa, "[ou]", "u")
ipa = subst(ipa, "ts", "tt")

-- I am confused by the rest. Is it /g/ or /ɣ/, /r/ or /ʁ/, etc?

return ipa

end

return export