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, 15:32

Line 47: Line 47:
   
 

local categories = "[[Category:Dutch weak verbs]]"

 

local categories = "[[Category:Dutch weak verbs]]"

  +

local title = "weak"

   
 

local pref = args["pref"] or ""

 

local pref = args["pref"] or ""

Line 69: Line 70:
   
 

linkify(forms)

 

linkify(forms)

 

local title = "<span lang=\"nl\">" .. forms["pres_indc_pl"] .. "</span> (weak)"

 
   
 

if forms["past_ptc"]:find("n$") then

 

if forms["past_ptc"]:find("n$") then

title = "<span lang=\"nl\">" .. forms["pres_indc_pl"] .. "</span> (weak with strong past participle)"

 
 

categories = categories .. "[[Category:Dutch weak verbs with strong past participles]]"

 

categories = categories .. "[[Category:Dutch weak verbs with strong past participles]]"

  +

title = title .. " with strong past participle"

 

end

 

end

   
Line 88: Line 87:
   
 

local categories = "[[Category:Dutch weak verbs (-cht)]]"

 

local categories = "[[Category:Dutch weak verbs (-cht)]]"

  +

local title = "weak with past in ''-cht''"

   
 

local pref = args["pref"] or ""

 

local pref = args["pref"] or ""

Line 106: Line 106:
   
 

process_sep(forms, sep)

 

process_sep(forms, sep)

 

local title = "<span lang=\"nl\">" .. forms["pres_indc_pl"] .. "</span> (weak with past in ''-cht'')"

 
   
 

linkify(forms)

 

linkify(forms)

   

local aux = args["aux"] or "hebben"

+

forms["past_ptc"] = "(" .. link_form(args["aux"] or "hebben") .. ") " .. forms["past_ptc"]

forms["past_ptc"] = "(" .. link_form(aux) .. ") " .. forms["past_ptc"]

 
   
 

return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")

 

return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")

Line 121: Line 119:
 

NAMESPACE = frame:preprocess("{{NAMESPACE}}")

 

NAMESPACE = frame:preprocess("{{NAMESPACE}}")

   

local class = args["class"]

+

local class = args["class"] or ""; if class ~= "" then class = " class" .. class end

local categories = "[[Category:Dutch" .. (class and " class " .. class or "") .. " strong verbs]]"

+

local categories = "[[Category:Dutch" .. class .. " strong verbs]]"

  +

local title = "strong" .. class

   
 

local pref = args["pref"] or ""

 

local pref = args["pref"] or ""

Line 145: Line 143:
   
 

process_sep(forms, sep)

 

process_sep(forms, sep)

 

local title = "<span lang=\"nl\">" .. forms["pres_indc_pl"] .. "</span> (strong" .. (class and " class " .. class or "") .. ")"

 
   
 

if not forms["past_ptc"]:find("n$") then

 

if not forms["past_ptc"]:find("n$") then

title = "<span lang=\"nl\">" .. forms["pres_indc_pl"] .. "</span> (strong" .. (class and " class " .. class or "") .. " with weak past participle)"

 
 

categories = categories .. "[[Category:Dutch strong verbs with weak past participles]]"

 

categories = categories .. "[[Category:Dutch strong verbs with weak past participles]]"

  +

title = title .. " with weak past participle"

 

end

 

end

   
 

linkify(forms)

 

linkify(forms)

   

local aux = args["aux"] or "hebben"

+

forms["past_ptc"] = "(" .. link_form(args["aux"] or "hebben") .. ") " .. forms["past_ptc"]

forms["past_ptc"] = "(" .. link_form(aux) .. ") " .. forms["past_ptc"]

 
   
 

return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")

 

return make_table(forms, title, sep ~= "") .. (NAMESPACE == "" and categories or "")

Line 222: Line 218:
 

return [=[

 

return [=[

 

<div class="NavFrame" style="width: ]=] .. (sep and 72 or 42) .. [=[em;">

 

<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="NavHead" style="background: #CCCCFF; text-align: left;">Conjugation of '']=] .. forms["pres_indc_pl"] .. "''" .. (title and " (" .. title .. ")" or "") .. [=[</div>

 

<div class="NavContent">

 

<div class="NavContent">

 

{| style="width:100%; border:1px solid #CCCCFF; text-align:center; line-height:125%" class="inflection-table" cellspacing="1" cellpadding="3"

 

{| style="width:100%; border:1px solid #CCCCFF; text-align:center; line-height:125%" class="inflection-table" cellspacing="1" cellpadding="3"


  --[=[      This module contains functions for creating inflection tables for Dutch      verbs.  ]=]--     local export = {}     function present(forms, pref, pres_stem, pres_stemE)      local pres_stemT = pres_stem .. (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 .. "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 .. "nd"  end     function past(forms, 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  end     function past_ptc(forms, 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         forms["past_ptc"] = past_ptc_stem  end     function export.weak(frame)      local args = frame:getParent().args      PAGENAME = frame:preprocess("{{PAGENAME}}")      NAMESPACE = frame:preprocess("{{NAMESPACE}}")         local categories = "[[Category:Dutch weak verbs]]"      local title = "weak"         local pref = args["pref"] or ""      if pref ~= "" then categories = categories .. "[[Category:Dutch prefixed verbs]]" end         local sep = args["sep"] or ""      if sep ~= "" then categories = categories .. "[[Category:Dutch separable verbs]]" end         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         local forms = {}         present(forms, pref, pres_stem, pres_stemE)      past(forms, pref, past_stem, past_stem, past_stem)      past_ptc(forms, pref, past_ptc_stem)         process_sep(forms, sep)         linkify(forms)         if forms["past_ptc"]:find("n$") then          categories = categories .. "[[Category:Dutch weak verbs with strong past participles]]"          title = title .. " with strong past participle"      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}}")         local categories = "[[Category:Dutch weak verbs (-cht)]]"      local title = "weak with past in ''-cht''"         local pref = args["pref"] or ""      if pref ~= "" then categories = categories .. "[[Category:Dutch prefixed verbs]]" end         local sep = args["sep"] or ""      if sep ~= "" then categories = categories .. "[[Category:Dutch separable verbs]]" end         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 forms = {}         present(forms, pref, pres_stem, pres_stemE)      past(forms, pref, past_stem, past_stem .. "e", past_stem)      past_ptc(forms, pref, past_stem)         process_sep(forms, sep)         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}}")         local class = args["class"] or ""; if class ~= "" then class = " class" .. class end      local categories = "[[Category:Dutch" .. class .. " strong verbs]]"      local title = "strong" .. class         local pref = args["pref"] or ""      if pref ~= "" then categories = categories .. "[[Category:Dutch prefixed verbs]]" end         local sep = args["sep"] or ""      if sep ~= "" then categories = categories .. "[[Category:Dutch separable verbs]]" end         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 forms = {}         present(forms, pref, pres_stem, pres_stemE)      past(forms, pref, past_stem, past_stemE, past_stemT)      past_ptc(forms, pref, args[3] or error("The third parameter is missing"))         process_sep(forms, sep)         if not forms["past_ptc"]:find("n$") then          categories = categories .. "[[Category:Dutch strong verbs with weak past participles]]"          title = title .. " with weak past participle"      end         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 process_sep(forms, sep)      if sep == "" then return end         local sepSuf = " " .. sep:gsub("-$", "")      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["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["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["pres_subj_sg_main"]  = forms["pres_subj_sg"] .. sepSuf      forms["past_subj_sg_main"]  = forms["past_subj_sg"] .. sepSuf         forms["impr_sg"] = forms["impr_sg"] .. sepSuf      forms["impr_pl"] = forms["impr_pl"] .. sepSuf         forms["pres_ptc"] = sep .. hyphen .. forms["pres_ptc"]      forms["past_ptc"] = sep .. forms["past_ptc"]         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["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["pres_subj_sg"] = sep .. hyphen .. forms["pres_subj_sg"]      forms["past_subj_sg"] = sep .. hyphen .. forms["past_subj_sg"]  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