Module:siwa-noun/common: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
local gsub = mw.ustring.gsub
local gsub = mw.ustring.gsub
local paren = mw.ustring.char(0x0028) .. mw.ustring.char(0x0029)


local export = {}
local export = {}
Line 8: Line 6:
--local word = frame:getParent().args[1] -- for testing
--local word = frame:getParent().args[1] -- for testing
local lenited = ""
local lenited = ""
local v = "([aeiouyůõảẻỉỏủỷę" .. paren .. "])"
local v = "([aeiouyůõảẻỉỏủỷę·])"
local lenition_patterns = {
local lenition_patterns = {
--geminated voiced stops
--geminated voiced stops
Line 31: Line 29:
for regex, repl in pairs(lenition_patterns) do
for regex, repl in pairs(lenition_patterns) do
if word:match("%(.*%)") then
if word:match("·.*·") then
lenited = gsub(word, "%(" .. regex .. "%)", repl, 1)
lenited = gsub(word, "·" .. regex .. "·", repl, 1)
else
else
lenited = gsub(word, regex, repl, 1)
lenited = gsub(word, regex, repl, 1)

Navigation menu