Module:sish-headword: Difference between revisions

No edit summary
No edit summary
Line 25: Line 25:
local unfd = mw.ustring.toNFD
local unfd = mw.ustring.toNFD
local insert = table.insert
local insert = table.insert
local GR = u(0x0300)
local AC = u(0x0301)
local TILDE = u(0x0303)
local MACRON = u(0x0304)
local DGRAVE = u(0x030F)
local INVBREVE = u(0x0311)
local tonal_accents = GR .. AC .. TILDE .. DGRAVE .. INVBREVE
local vowels = "aeiouаеиоу"
local vowels_that_can_bear_tone = vowels .. "rр"
local V = "[" .. vowels .. "]"


local list_param = {list = true, disallow_holes = true}
local list_param = {list = true, disallow_holes = true}
local boolean_param = {type = "boolean"}
local boolean_param = {type = "boolean"}
-- Table of all valid genders, mapping user-specified gender specs to canonicalized versions.
local valid_genders = {
["m"] = "m-an?",
["?"] = true,
["mfbysense-an"] = true,
["m-an"] = true,
["m-in"] = true,
["f"] = true,
["n"] = true,
["m-p"] = true,
["f-p"] = true,
["n-p"] = true,
}
-- Table of all valid aspects.
local valid_aspects = m_table.listToSet {
"impf", "pf", "both", "biasp", "?",
}


local function ine(val)
local function ine(val)
Line 155: Line 124:
}
}


local sc = lang:findBestScript(pagename)
local sc = lang:findBestScript(pagename, "forceDetect")
data.sc = sc
local other_sc
local other_sc