Module:accel/mk

return {generate = function (params, entry) -- Because Module:mk-pronunciation is not fully automatic, -- for words with irregular stress or other idiosyncrasies, -- manual respellings are required. -- Therefore, in all other cases: entry.pronunc = "* " -- Add it manually! local usub = mw.ustring.sub local vOrigPN = params.origin_pagename local vTargPN = params.target_pagename -- Macedonian adjectival participles if params.form == "m|sg|adj|part" then entry.pronunc = "* " entry.pos_header = "Participle" entry.head = "" entry.declension = "" end -- Macedonian perfect participles if params.form == "perf|part" then entry.pronunc = "* " entry.pos_header = "Participle" entry.head = "" end -- Macedonian l-participles if params.form == "m|sg|impf|lptcp" or params.form == "m|sg|aor|lptcp" then entry.pronunc = "* " -- Prevent wrong pron! Double check in 'Verb forms'. entry.pos_header = "Participle" entry.head = "" elseif params.form == "f|sg|impf|lptcp" or params.form == "f|sg|aor|lptcp" or params.form == "n|sg|impf|lptcp" or params.form == "n|sg|aor|lptcp" or params.form == "pl|impf|lptcp" or params.form == "pl|aor|lptcp" then entry.pronunc = "* " entry.pos_header = "Participle" entry.head = "" end -- Verb forms if params.pos == "verb" then -- Prevent wrong pron for verbs ending in -ира. local vira = usub(vOrigPN, -3) if vira == "ира" then if params.form == "m|sg|impf|lptcp" or params.form == "m|sg|aor|lptcp" or params.form == "1|sg|pres" or params.form == "2|sg|pres" or params.form == "1|sg|impf" or params.form == "1|sg|aor" or params.form == "2|sg|aor" or params.form == "3|sg|aor" or params.form == "m|sg|adj|part" or params.form == "2|sg|imp" then entry.pronunc = "* " -- Add it manually! else entry.pronunc = "* " end else entry.pronunc = "* " end -- Correct the pron of imp forms of ref verbs. local vjse = usub(vTargPN, -4) local vimpse = usub(vTargPN, 1, -5) if vjse == "ј_се" or vjse == "ј се" then entry.pronunc = "* " elseif vjse == "и_се" or vjse == "и се" then entry.pronunc = "* " elseif vjse == "е_се" or vjse == "е се" then entry.pronunc = "* " elseif vjse == "ј_си" or vjse == "ј си" then entry.pronunc = "* " elseif vjse == "и_си" or vjse == "и си" then entry.pronunc = "* " elseif vjse == "е_си" or vjse == "е си" then entry.pronunc = "* " end end -- Macedonian adverbial participles if params.form == "adv|part" then entry.pos_header = "Participle" local vjki = usub(vTargPN, -4) local vjkise = usub(vTargPN, -7) local vap = usub(vTargPN, 1, -5) local vapse = usub(vTargPN, 1, -8) if vjki == "ајќи" then entry.pronunc = "* " entry.head = "" elseif vjki == "ејќи" then entry.pronunc = "* " entry.head = "" elseif vjkise == "ајќи_се" or vjkise == "ајќи се" then entry.pronunc = "* " entry.head = "" elseif vjkise == "ејќи_се" or vjkise == "ејќи се" then entry.pronunc = "* " entry.head = "" elseif vjkise == "ајќи_си" or vjkise == "ајќи си" then entry.pronunc = "* " entry.head = "" elseif vjkise == "ејќи_си" or vjkise == "ејќи си" then entry.pronunc = "* " entry.head = "" end end -- Macedonian verbal nouns if params.form == "vnoun" then entry.pronunc = "* " entry.pos_header = "Noun" entry.declension = "" end -- Comd and supd of adj's. Prevent double entries if there are stress marks. -- Stress marks are supported in headword lines, but not in inflection tables. if params.form == "indef|m|sg|comd" or params.form == "indef|m|sg|supd" then entry.head = "" end -- Noun forms. Prevent double entries if there are stress marks. -- Stress marks are supported in headword lines, but not in inflection tables. if params.form == "indef|pl|;|voc|pl" then if entry.pos_header == "Noun" then entry.head = "" elseif entry.pos_header == "Proper noun" then entry.head = "" end end -- Macedonian augmentatives (lemmas) if params.form == "augmentative" then local vaug = usub(vTargPN, 1, -2) local vsuf_1 = usub(vTargPN, -4) local vsuf_2 = usub(vTargPN, -5) entry.pronunc = "* " if vsuf_1 == "иште" then entry.etymology = "" entry.head = "" entry.declension = "" elseif vsuf_2 == "етина" then entry.etymology = "" entry.head = "" entry.declension = "" end end -- Macedonian adverbs (lemmas) -- Created via headword line. if params.form == "adverb" then entry.pos_header = "Adverb" entry.head = "" entry.def = "" end end}