10,735
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
["lfv"] = true | ["lfv"] = true | ||
} -- list of language codes which get rhyme from secondary stress as well as primary | } -- list of language codes which get rhyme from secondary stress as well as primary | ||
local no_primary_if_secondary = { | |||
["lfv"] = true | |||
} -- list of language codes which ignore primary stress if secondary stress is present | |||
function de_onset(ipa) | function de_onset(ipa) | ||
Line 58: | Line 62: | ||
local rhyme2 | local rhyme2 | ||
if from_secondary[language.code] and mw.ustring.find(rhyme, "ˌ") then | if from_secondary[language.code] and mw.ustring.find(rhyme, "ˌ") then | ||
rhyme2 = | rhyme2 = mw.ustring.match(rhyme, "ˌ(.*)$") | ||
end | end | ||
rhyme = mw.ustring.match(rhyme, "ˈ(.*)$") or rhyme | rhyme = mw.ustring.match(rhyme, "ˈ(.*)$") or rhyme | ||
table.insert(rhymes, de_onset(rhyme)) | if rhyme2 == nil or no_primary_if_secondary[language.code] ~= true then | ||
table.insert(rhymes, de_onset(rhyme)) | |||
end | |||
if rhyme2 then | if rhyme2 then | ||
table.insert(rhymes, de_onset(rhyme2)) | |||
end | end | ||
end | end |