Module:siwa-noun: Difference between revisions

No edit summary
No edit summary
Line 38: Line 38:
function syll_count(word)
function syll_count(word)
for digraph, repl in pairs(digraphs_to_single) do
for digraph, repl in pairs(digraphs_to_single) do
gsub(word, digraph, repl)
word = gsub(word, digraph, repl)
end
end
--word = m_pron.crux(word, true, false, false)
--word = m_pron.crux(word, true, false, false)
--word = gsub(word, "[ˌˈ]", "")
--word = gsub(word, "[ˌˈ]", "")
local pattern = "(" .. xc .. "?" .. vowels .. "+ː?" .. xc .. "*)"
local pattern = "(" .. xc .. "?" .. vowels .. "+ː?" .. xc .. "*)"
syllable, n = "a", 5
syllable, n = gsub(word, pattern, "%1")
--syllable, n = gsub(word, pattern, "%1")
syllable = match(syllable, pattern)
--syllable = match(syllable, pattern)
return syllable, n, word
return syllable, n, word