Module:siwa-noun: Difference between revisions
No edit summary |
No edit summary |
||
| Line 44: | Line 44: | ||
function syll_count(word) | function syll_count(word) | ||
local pattern = "(" .. consonants .. "?" .. vowels .. "+ː?" .. consonants .. "*)" | local pattern = "(" .. consonants .. "?" .. vowels .. "+ː?" .. consonants .. "*)" | ||
syllable, n = gsub(word, pattern, "%1") | syllable, n = gsub(word, pattern, "%1") | ||
syllable = match(syllable, pattern) | syllable = match(syllable, pattern) | ||
return syllable, n | return syllable, n | ||
end | end | ||
| Line 54: | Line 53: | ||
local pattern = xc .. "?(" .. vowels .. "+ː?)(" .. xc .. "*)" | local pattern = xc .. "?(" .. vowels .. "+ː?)(" .. xc .. "*)" | ||
local v, c = match(word, pattern) | local v, c = match(word, pattern) | ||
return v | return v, c | ||
end | end | ||
| Line 84: | Line 83: | ||
local sv = nil | local sv = nil | ||
local decl_type = {} | local decl_type = {} | ||
local gender, word = args[1], args[2] | local gender, word = args[1], dedigraphize(args[2]) | ||
local quality = args[3]~=nil and args[3] or detect_quality(word) | local quality = args[3]~=nil and args[3] or detect_quality(word) | ||
local prefix = sub(pagename, 1, -(#word+1)) | local prefix = sub(pagename, 1, -(#word+1)) | ||
return | return stressed_components(word) | ||
end | end | ||
return export | return export | ||