Tuesday, February 26, 2013

Wiktionary - Recent changes [en]: Module:nl-verb

Wiktionary - Recent changes [en]
Track the most recent changes to the wiki in this feed. // via fulltextrssfeed.com
Module:nl-verb
Feb 26th 2013, 20:30

  --[=[      This module contains functions for creating inflection tables for Dutch      verbs.  ]=]--     local export = {}     -- Definitions for irregular verbs  function irr_houden(forms, sep, pref)      forms["pres_indc_1sg"] = link_form(sep .. pref .. "hou") .. ", " .. forms["pres_indc_1sg"]         if sep ~= "" then          forms["pres_indc_1sg_main"] = link_form(pref .. "hou " .. sep) .. ", " .. forms["pres_indc_1sg_main"]          forms["impr_sg"] = link_form(pref .. "hou " .. sep) .. ", " .. forms["impr_sg"]      else          forms["impr_sg"] = link_form(pref .. "hou") .. ", " .. forms["impr_sg"]      end  end     function irr_snijden(forms, sep, pref)      forms["pres_indc_1sg"] = link_form(sep .. pref .. "snij") .. ", " .. forms["pres_indc_1sg"]         if sep ~= "" then          forms["pres_indc_1sg_main"] = link_form(pref .. "snij " .. sep) .. ", " .. forms["pres_indc_1sg_main"]          forms["impr_sg"] = link_form(pref .. "snij " .. sep) .. ", " .. forms["impr_sg"]      else          forms["impr_sg"] = link_form(pref .. "snij") .. ", " .. forms["impr_sg"]      end  end     function irr_zeggen(forms, sep, pref)      local forms2 = {}         past(forms2, sep, pref, "zei", "zeide", "zeidt")      linkify(forms2)         for key, form in pairs(forms2) do          forms[key] = forms2[key] .. ", " .. forms[key]      end  end     function export.hebben(frame)      local args = frame:getParent().args      PAGENAME = frame:preprocess("{{PAGENAME}}")      NAMESPACE = frame:preprocess("{{NAMESPACE}}")         local categories = "[[Category:Dutch irregular weak verbs]]"      local title = "weak, irregular"         local pref = args["pref"] or ""      local sep = args["sep"] or ""      local sepSuf = ""; if sep ~= "" then sepSuf = " " .. sep end         local forms = {}         present(forms, sep, pref, "heb", "hebbe")      past(forms, sep, pref, "had", "hadde", "hadt")      past_ptc(forms, sep, pref, "had")         forms["pres_indc_3sg"] = sep .. pref .. "heeft"      forms["pres_indc_3sg_main"] = pref .. "heeft" .. sepSuf         linkify(forms)         if pref ~= "" then          categories = categories .. "[[Category:Dutch prefixed verbs]]"          title = title .. ", prefixed"      end         if sep ~= "" then          categories = categories .. "[[Category:Dutch separable verbs]]"          title = title .. ", separable"      end         forms["past_ptc"] = "(" .. link_form(args["aux"] or "hebben") .. ") " .. forms["past_ptc"]         return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")  end     function export.zijn(frame)      local args = frame:getParent().args      PAGENAME = frame:preprocess("{{PAGENAME}}")      NAMESPACE = frame:preprocess("{{NAMESPACE}}")         local categories = "[[Category:Dutch irregular verbs]]"      local title = "irregular, suppletive"         local pref = args["pref"] or ""      local sep = args["sep"] or ""      local sepSuf = ""; if sep ~= "" then sepSuf = " " .. sep end         local forms = {}         present(forms, sep, pref, "ben", "zij")      past(forms, sep, pref, "was", "ware", "waart")      past_ptc(forms, sep, pref, "weest")         forms["pres_indc_gij"] = sep .. pref .. "zijt"      forms["pres_indc_gij_main"] = pref .. "zijt" .. sepSuf      forms["pres_indc_3sg"] = sep .. pref .. "is"      forms["pres_indc_3sg_main"] = pref .. "is" .. sepSuf         forms["impr_sg"] = pref .. "wees" .. sepSuf      forms["impr_pl"] = pref .. "weest " .. sepSuf         linkify(forms)         if pref ~= "" then          categories = categories .. "[[Category:Dutch prefixed verbs]]"          title = title .. ", prefixed"      end         if sep ~= "" then          categories = categories .. "[[Category:Dutch separable verbs]]"          title = title .. ", separable"      end         forms["past_ptc"] = "(" .. link_form(args["aux"] or "zijn") .. ") " .. forms["past_ptc"]         return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")  end     local irregular_verbs = {      houd = irr_houden,      snijd = irr_snijden,      zeg = irr_zeggen }     function export.weak(frame)      local args = frame:getParent().args      PAGENAME = frame:preprocess("{{PAGENAME}}")      NAMESPACE = frame:preprocess("{{NAMESPACE}}")         -- begin type-specific      local categories = "[[Category:Dutch weak verbs]]"      local title = "weak"         local pres_stem = args[1] or error("The first parameter is missing")      local pres_stemE = (args[2] or ""); if pres_stemE == "" then pres_stemE = pres_stem .. "e" else pres_stemE = pres_stemE end         local dt = args["dt"] or ""; if dt == "" then if pres_stemE:find("[cfhkpqstx]e$") then dt = "t" else dt = "d" end end      local past_stem = pres_stem .. dt .. "e"         local past_ptc_stem = (args[3] or ""); if past_ptc_stem == "" then past_ptc_stem = pres_stem .. (pres_stem:find("[dt]$") and "" or dt) end         if past_ptc_stem:find("n$") then          categories = categories .. "[[Category:Dutch weak verbs with strong past participles]]"          title = title .. " with strong past participle"      end      -- end type-specific         local pref = args["pref"] or ""      local sep = args["sep"] or ""         local forms = {}         present(forms, sep, pref, pres_stem, pres_stemE)      past(forms, sep, pref, past_stem, past_stem, past_stem)      past_ptc(forms, sep, pref, past_ptc_stem)         linkify(forms)         -- Is this listed as an irregular verb?      if irregular_verbs[pres_stem] then          irregular_verbs[pres_stem](forms, sep, pref)          categories = categories .. "[[Category:Dutch irregular weak verbs]]"          title = title .. ", irregular"      end         if pref ~= "" then          categories = categories .. "[[Category:Dutch prefixed verbs]]"          title = title .. ", prefixed"      end         if sep ~= "" then          categories = categories .. "[[Category:Dutch separable verbs]]"          title = title .. ", separable"      end         forms["past_ptc"] = "(" .. link_form(args["aux"] or "hebben") .. ") " .. forms["past_ptc"]         return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")  end     function export.weak_cht(frame)      local args = frame:getParent().args      PAGENAME = frame:preprocess("{{PAGENAME}}")      NAMESPACE = frame:preprocess("{{NAMESPACE}}")         -- begin type-specific      local categories = "[[Category:Dutch weak verbs (-cht)]]"      local title = "weak with past in ''-cht''"         local pres_stem = args[1] or error("The first parameter is missing")      local pres_stemE = args[2] or ""; if pres_stemE == "" then pres_stemE = pres_stem .. "e" end         local past_stem = (args[3] or error("The third parameter is missing")) .. "cht"      local past_stemE = past_stem .. "e"      -- end type-specific         local pref = args["pref"] or ""      if pref ~= "" then          categories = categories .. "[[Category:Dutch prefixed verbs]]"          title = title .. ", prefixed"      end         local sep = args["sep"] or ""      if sep ~= "" then          categories = categories .. "[[Category:Dutch separable verbs]]"          title = title .. ", separable"      end         local forms = {}         present(forms, sep, pref, pres_stem, pres_stemE)      past(forms, sep, pref, past_stem, past_stemE, past_stem)      past_ptc(forms, sep, pref, past_stem)         linkify(forms)         forms["past_ptc"] = "(" .. link_form(args["aux"] or "hebben") .. ") " .. forms["past_ptc"]         return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")  end     function export.strong(frame)      local args = frame:getParent().args      PAGENAME = frame:preprocess("{{PAGENAME}}")      NAMESPACE = frame:preprocess("{{NAMESPACE}}")         -- begin type-specific      local class = args["class"] or ""; if class ~= "" then class = " class " .. class end      local categories = "[[Category:Dutch" .. class .. " strong verbs]]"      local title = "strong" .. class         local pres_stem = args[1] or error("The first parameter is missing")      local pres_stemT = pres_stem .. (pres_stem:find("t$") and "" or "t")      local pres_stemE = args[4] or ""; if pres_stemE == "" then pres_stemE = pres_stem .. "e" end         local past_stem = args[2] or error("The second parameter is missing")      local past_stemT = args[6] or ""; if past_stemT == "" then past_stemT = past_stem .. (pres_stem:find("t$") and "" or "t") end      local past_stemE = args[5] or ""; if past_stemE == "" then past_stemE = past_stem .. "e" end         local past_ptc_stem = args[3] or error("The third parameter is missing")         -- If the final consonant of the past participle is not n, then it is a weak past participle.      if not past_ptc_stem:find("n$") then          categories = categories .. "[[Category:Dutch strong verbs with weak past participles]]"          title = title .. " with weak past participle"      end         -- end type-specific         local pref = args["pref"] or ""      local sep = args["sep"] or ""         local forms = {}         present(forms, sep, pref, pres_stem, pres_stemE)      past(forms, sep, pref, past_stem, past_stemE, past_stemT)      past_ptc(forms, sep, pref, past_ptc_stem)         linkify(forms)         -- Is this listed as an irregular verb?      if irregular_verbs[pres_stem] then          irregular_verbs[pres_stem](forms, sep, pref)          categories = categories .. "[[Category:Dutch irregular strong verbs]]"          title = title .. ", irregular"      -- If the initial or final consonants of the present stem don't match, then this verb is irregular.      elseif pres_stem:match("^([^aeiouyj]*)") ~= past_stem:match("^([^aeiouyj]*)") or pres_stem:match("([^aeiouyj]*)$") ~= past_stem:match("([^aeiouyj]*)$") then          categories = categories .. "[[Category:Dutch irregular strong verbs]]"          title = title .. ", irregular"      end         if pref ~= "" then          categories = categories .. "[[Category:Dutch prefixed verbs]]"          title = title .. ", prefixed"      end         if sep ~= "" then          categories = categories .. "[[Category:Dutch separable verbs]]"          title = title .. ", separable"      end         forms["past_ptc"] = "(" .. link_form(args["aux"] or "hebben") .. ") " .. forms["past_ptc"]         return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")  end     -- Create regular present-tense forms  function present(forms, sep, pref, pres_stem, pres_stemE)      local extra_vowel = pres_stem:match("(a?)$")      local pres_stemT = pres_stem .. extra_vowel .. (pres_stem:find("t$") and "" or "t")         forms["pres_indc_1sg"] = pref .. pres_stem      forms["pres_indc_2sg"] = pref .. pres_stemT      forms["pres_indc_gij"] = pref .. pres_stemT      forms["pres_indc_3sg"] = pref .. pres_stemT      forms["pres_indc_pl"]  = pref .. pres_stemE .. extra_vowel .. "n"         forms["pres_subj_sg"] = pref .. pres_stemE         forms["impr_sg"] = pref .. pres_stem      forms["impr_pl"] = pref .. pres_stemT         forms["pres_ptc"] = pref .. pres_stemE .. extra_vowel .. "nd"         if sep ~= "" then          local sepSuf = " " .. sep             -- for verbs like na-apen, which get a hyphen between          local hyphen = ""          if sep:sub(-1) == forms["pres_indc_1sg"]:sub(1,1) and mw.ustring.find("aeiou", sep:sub(-1)) then hyphen = "-" end             forms["impr_sg"] = forms["impr_sg"] .. sepSuf          forms["impr_pl"] = forms["impr_pl"] .. sepSuf             forms["pres_ptc"] = sep .. hyphen .. forms["pres_ptc"]             -- Create main clause forms          forms["pres_indc_1sg_main"] = forms["pres_indc_1sg"] .. sepSuf          forms["pres_indc_2sg_main"] = forms["pres_indc_2sg"] .. sepSuf          forms["pres_indc_gij_main"] = forms["pres_indc_gij"] .. sepSuf          forms["pres_indc_3sg_main"] = forms["pres_indc_3sg"] .. sepSuf          forms["pres_indc_pl_main"]  = forms["pres_indc_pl"]  .. sepSuf             forms["pres_subj_sg_main"]  = forms["pres_subj_sg"] .. sepSuf             -- Add separable part to subclause forms          forms["pres_indc_1sg"] = sep .. hyphen .. forms["pres_indc_1sg"]          forms["pres_indc_2sg"] = sep .. hyphen .. forms["pres_indc_2sg"]          forms["pres_indc_gij"] = sep .. hyphen .. forms["pres_indc_gij"]          forms["pres_indc_3sg"] = sep .. hyphen .. forms["pres_indc_3sg"]          forms["pres_indc_pl"]  = sep .. hyphen .. forms["pres_indc_pl"]             forms["pres_subj_sg"] = sep .. hyphen .. forms["pres_subj_sg"]      end  end     -- Create regular past-tense forms  function past(forms, sep, pref, past_stem, past_stemE, past_stemT)      forms["past_indc_sg"]  = pref .. past_stem      forms["past_indc_gij"] = pref .. past_stemT      forms["past_indc_pl"]  = pref .. past_stemE .. "n"         forms["past_subj_sg"] = pref .. past_stemE         if sep ~= "" then          local sepSuf = " " .. sep             -- for verbs like na-apen, which get a hyphen between          local hyphen = ""          if sep:sub(-1) == forms["past_indc_sg"]:sub(1,1) and mw.ustring.find("aeiou", sep:sub(-1)) then hyphen = "-" end             -- Create main clause forms          forms["past_indc_sg_main"]  = forms["past_indc_sg"]  .. sepSuf          forms["past_indc_gij_main"] = forms["past_indc_gij"] .. sepSuf ;           forms["past_indc_pl_main"]  = forms["past_indc_pl"]  .. sepSuf ;              forms["past_subj_sg_main"]  = forms["past_subj_sg"] .. sepSuf             -- Add separable part to subclause forms          forms["past_indc_sg"]  = sep .. hyphen .. forms["past_indc_sg"]          forms["past_indc_gij"] = sep .. hyphen .. forms["past_indc_gij"]          forms["past_indc_pl"]  = sep .. hyphen .. forms["past_indc_pl"]             forms["past_subj_sg"] = sep .. hyphen .. forms["past_subj_sg"]      end  end     -- Create a regular past participle  function past_ptc(forms, sep, pref, past_ptc_stem)      if pref == "" then          past_ptc_stem = "ge" .. past_ptc_stem:gsub("^e", "ë"):gsub("^i", "ï"):gsub("^u", "ü")      else          past_ptc_stem = pref .. past_ptc_stem      end         if sep ~= "" then          forms["past_ptc"] = sep .. past_ptc_stem      else          forms["past_ptc"] = past_ptc_stem      end  end     function link_form(form)      if form ~= "" then          if form == PAGENAME then              return "<span lang=\"nl\">[[" .. form .. "]]</span>"          else              return "<span lang=\"nl\">[[" .. form .. "#Dutch|" .. form .. "]]</span>"          end      else          return "&mdash;"      end  end     function linkify(forms)      for key, form in pairs(forms) do          forms[key] = link_form(form)      end  end     function make_table(forms, title, sep)         return [=[  <div class="NavFrame" style="width: ]=] .. (sep and 72 or 42) .. [=[em;">  <div class="NavHead" style="background: #CCCCFF; text-align: left;">Conjugation of '']=] .. forms["pres_indc_pl"] .. "''" .. (title and " (" .. title .. ")" or "") .. [=[</div>  <div class="NavContent">  {| style="width:100%; border:1px solid #CCCCFF; text-align:center; line-height:125%" class="inflection-table" cellspacing="1" cellpadding="3"  |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[infinitive]]  | colspan="4" | ]=] .. forms["pres_indc_pl"] .. [=[     ]=] .. (sep and [=[|- style="background: #E6E6FF;"  |  | colspan="2" style="font-weight: bold;" | [[main&nbsp;clause]]  | colspan="2" style="font-weight: bold;" | [[subordinate&nbsp;clause]]  |- style="background: #E6E6FF;"  |   | style="width: 25%; font-weight: bold" | [[present&nbsp;tense]]  | style="width: 25%; font-weight: bold" | [[past&nbsp;tense]]  | style="width: 25%; font-weight: bold" | [[present&nbsp;tense]]  | style="width: 25%; font-weight: bold" | [[past&nbsp;tense]]]=] or [=[     |- style="background: #E6E6FF;"  |   | style="width: 50%; font-weight: bold" | [[present&nbsp;tense]]  | style="width: 50%; font-weight: bold" | [[past&nbsp;tense]]]=]) .. [=[     |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[first-person|1st&nbsp;person]]&nbsp;[[singular]]  | ]=] .. (sep and forms["pres_indc_1sg_main"] .. " || " .. forms["past_indc_sg_main"] .. " || " or "") .. forms["pres_indc_1sg"] .. " || " .. forms["past_indc_sg"] .. [=[     |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[second-person|2nd&nbsp;person]]&nbsp;[[singular]]  | ]=] .. (sep and forms["pres_indc_2sg_main"] .. " || " .. forms["past_indc_sg_main"] .. " || " or "") .. forms["pres_indc_2sg"] .. " || " .. forms["past_indc_sg"] .. [=[     ]=] .. ((forms["pres_indc_gij"] ~= forms["pres_indc_2sg"] or forms["past_indc_gij"] ~= forms["past_indc_sg"]) and [=[|- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[second-person|2nd&nbsp;person]]&nbsp;[[singular|sing.]]&nbsp;([[gij#Dutch|gij]])  | ]=] .. (sep and forms["pres_indc_gij_main"] .. " || " .. forms["past_indc_gij_main"] .. " || " or "") .. forms["pres_indc_gij"] .. " || " .. forms["past_indc_gij"] or "") .. [=[     |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[third-person|3rd&nbsp;person]]&nbsp;[[singular]]  | ]=] .. (sep and forms["pres_indc_3sg_main"] .. " || " .. forms["past_indc_sg_main"] .. " || " or "") .. forms["pres_indc_3sg"] .. " || " .. forms["past_indc_sg"] .. [=[     |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[plural]]  | ]=] .. (sep and forms["pres_indc_pl_main"] .. " || " .. forms["past_indc_pl_main"] .. " || " or "") .. forms["pres_indc_pl"] .. " || " .. forms["past_indc_pl"] .. [=[     |- style="background: #E6E6FF; height: 0.5em"  |  | colspan="2" |]=] .. (sep and [=[ || colspan="2" |]=] or "") .. [=[     |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[subjunctive]]&nbsp;[[singular|sing.]]<sup>1</sup>  | ]=] .. (sep and forms["pres_subj_sg_main"] .. " || " .. forms["past_subj_sg_main"] .. " || " or "") .. forms["pres_subj_sg"] .. " || " .. forms["past_subj_sg"] .. [=[     |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[subjunctive]]&nbsp;[[plural|plur.]]<sup>1</sup>  | ]=] .. (sep and forms["pres_indc_pl_main"] .. " || " .. forms["past_indc_pl_main"] .. " || " or "") .. forms["pres_indc_pl"] .. " || " .. forms["past_indc_pl"] .. [=[     |- style="background: #E6E6FF; height: 0.5em"  |  | colspan="2" |]=] .. (sep and [=[ || rowspan="5" colspan="2" |]=] or "") .. [=[     |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[imperative]]&nbsp;[[singular|sing.]]  | ]=] .. forms["impr_sg"] .. [=[     | rowspan="2" style="background: #E6E6FF;" |  |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[imperative]]&nbsp;[[plural|plur.]]<sup>1</sup>  | ]=] .. forms["impr_pl"] .. [=[     |- style="background: #E6E6FF; height: 0.5em"  |  | colspan="2" |  |- style="background: #F2F2FF;"  ! style="background: #CCCCFF;" | [[participles]]  | ]=] .. forms["pres_ptc"] .. " || " .. forms["past_ptc"] .. [=[     |- style="background: #E6E6FF;"  | colspan="5" style="text-align:left; vertical-align:top; font-size: smaller; line-height: 1em" | <sup>1)</sup> [[Wiktionary:Glossary#archaic|Archaic]].  |}</div></div>]=]  end     return export     -- [[Category:Modules]]  

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions