Module:mg-spel: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 85: Line 85:
local spat = {
local spat = {
["p"] = "b", ["b"] = "v", ["d"] = "z", ["t"] = "d", ["c"] = "g", ["q"] = "g", ["g"] = "h",
["p"] = "b", ["b"] = "v", ["d"] = "z", ["t"] = "d", ["g"] = "h", ["c"] = "g", ["q"] = "g",  
["P"] = "B", ["B"] = "V", ["D"] = "Z", ["T"] = "D", ["C"] = "G", ["q"] = "G", ["g"] = "H"
["P"] = "B", ["B"] = "V", ["D"] = "Z", ["T"] = "D", ["G"] = "H", ["C"] = "G", ["Q"] = "G",
}
}
local npat = {
local npat = {
Line 97: Line 97:
for regex, repl in pairs(mutation == "nasal" and npat or spat) do
for regex, repl in pairs(mutation == "nasal" and npat or spat) do
mutated = gsub(term, "^" .. regex, repl, 1)
mutated = gsub(term, "^" .. regex, repl, 1)
--mutated = gsub(mutated, "^k(.)", function(foo) return match(foo, "[aou]") and "c" or "qu" end)
mutated = gsub(mutated, "^k(.)", function(foo) return match(foo, "[aou]") and "c" or "qu" end)
if mutated ~= term then return mutated end
if mutated ~= term then return mutated end
end
end
--mutated = gsub(mutated, "^k(.)", function(foo) return match(foo, "[aou]") and "c" or "qu" end)
return unchanged
return unchanged

Navigation menu