10,731
edits
TheNightAvl (talk | contribs) (Added apostrophes to affix group) |
TheNightAvl (talk | contribs) (Added generate_array) |
||
Line 153: | Line 153: | ||
end | end | ||
function syllabify(graphemes | function syllabify(graphemes) | ||
mw.log("————— SYLLABIFYING —————") | mw.log("————— SYLLABIFYING —————") | ||
Line 290: | Line 290: | ||
end | end | ||
end | end | ||
return graphemes | |||
end | |||
function export.generate(frame) | |||
local args = getArgs(frame) | |||
if args[1] == nil then | |||
error("Word needed.") | |||
end | |||
local outputSyllables = args[1] | |||
outputSyllables = graphemise(outputSyllables) | |||
outputSyllables = syllabify(outputSyllables) | |||
local divider = args[2] | |||
if divider == nil then | if divider == nil then | ||
Line 295: | Line 314: | ||
end | end | ||
outputSyllables = table.concat(outputSyllables) | |||
outputSyllables = mw.ustring.gsub(outputSyllables, "(σ)", divider) | |||
return | return outputSyllables | ||
end | end | ||
function export.generate_array(frame) | |||
function export. | |||
local args = getArgs(frame) | local args = getArgs(frame) | ||
Line 313: | Line 331: | ||
outputSyllables = graphemise(outputSyllables) | outputSyllables = graphemise(outputSyllables) | ||
outputSyllables = syllabify(outputSyllables | outputSyllables = syllabify(outputSyllables) | ||
return outputSyllables | return outputSyllables | ||