Module:rad-pronunciation: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 22: Line 22:
     local register = {["colloquial"] = "colloquial", ["formal"] = "formal", ["humorous"] = "humorous"}
     local register = {["colloquial"] = "colloquial", ["formal"] = "formal", ["humorous"] = "humorous"}
     local dialect = {["hjádvanþs"] = "hjádvanþs", ["coastal"] = "coastal", ["insular"] = "insular"}
     local dialect = {["hjádvanþs"] = "hjádvanþs", ["coastal"] = "coastal", ["insular"] = "insular"}
    -- get automations --
    local auto_IPA = m_rad_IPA.generate({word})
    local auto_IPA_phon = m_rad_IPA.generate({word, "phon"})
    local auto_IPA_hj = m_rad_IPA.generate({word, "hj"})
    local auto_IPA_phon_hj = m_rad_IPA.generate({word, "hj", "phon"})
    local auto_syllables = m_rad_syllables.generate({word})


     -- create data arrays --
     -- create data arrays --
Line 59: Line 52:
     local working_syllables = ""
     local working_syllables = ""
     local manual_entry = false
     local manual_entry = false
   
    -- account for acronyms
    if mw.ustring.find(word, "[A-ZÀÁẢÂÈÌÍỈÒØÙÛÚỦÝỶỲŪ][A-ZÀÁẢÂÈÌÍỈÒØÙÛÚỦÝỶỲŪ]+") then
    syllables_no_auto = true
end


     -- turn off rhymes if affix
     -- turn off rhymes if affix
Line 186: Line 184:
     end
     end


     i = nil
     -- get automations --
    local auto_IPA = IPA_no_auto == false and m_rad_IPA.generate({word})
    local auto_IPA_phon = IPA_no_auto == false and m_rad_IPA.generate({word, "phon"})
    local auto_IPA_hj = IPA_no_auto == false and m_rad_IPA.generate({word, "hj"})
    local auto_IPA_phon_hj = IPA_no_auto == false and m_rad_IPA.generate({word, "hj", "phon"})
    local auto_syllables = syllables_no_auto == false and m_rad_syllables.generate({word})


     -- add auto values --
     -- add auto values --

Navigation menu