Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 4: Line 4:
local m_su = require("Module:string utilities")
local m_su = require("Module:string utilities")
local m_table = require("Module:table")
local m_table = require("Module:table")
local m_data = mw.loadData('Module:siwa-pron/data')
local m_sm = mw.loadData('Module:siwa-pron/data')




Line 24: Line 24:
local vowels = "aæɑeɛiɪɔʊyœøɤ"
local vowels = "aæɑeɛiɪɔʊyœøɤ"


local initial = "(" .. table.concat(m_data.initial_clusters, "|") .. ")" .. consonants
--[[function export.syllable(frame)
local internal = "(" .. table.concat(m_data.internal_clusters, "|") .. ")" .. consonants
local vocalic = "aeiouyảẻỉỏủỷůõę" .. "(" .. table.concat(m_data.diphthongs, "|") .. table.concat(m_data.triphthongs, "|") .. ")"
 
function export.syllable(frame)
local word = mw.title.getCurrentTitle().text
local word = mw.title.getCurrentTitle().text
local pattern = "^[" .. initial .. "]?[" .. vocalic .. "]{1}[" .. internal .. "]?"
local pattern = "^[" .. initial .. "]?[" .. vocalic .. "]{1}[" .. internal .. "]?"
x = m_su.capturing_split(word, pattern)
x = m_su.capturing_split(word, pattern)
return x[1]
return x[1]
end
end]]


function export.show(frame)
function export.show(frame)