local export = {}
local pos_functions = {}
local lang = require("Module:languages").getByCode("pag")
local PAGENAME = mw.title.getCurrentTitle().text
local script = lang:findBestScript(PAGENAME) -- Latn or Tglg
function export.show(frame)
local tracking_categories = {}
local args = frame:getParent().args
local poscat = frame.args or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")
local head = {} -- supports multiple headword
if args or args then table.insert(head, args or args) end
if args or args then table.insert(head, args or args) end
if args or args then table.insert(head, args or args) end
local data = {lang = lang, sc = script, pos_category = poscat, categories = {}, heads = head, translits = {"-"}, inflections = {}}
--Baybayin
local baybayin = {label = "Baybayin spelling"}
local sc_Tglg = require("Module:scripts").getByCode("Tglg")
if args then table.insert(baybayin, { term = args, sc = sc_Tglg }) end
if args then table.insert(baybayin, { term = args, sc = sc_Tglg }) end
if args then table.insert(baybayin, { term = args, sc = sc_Tglg }) end
if #baybayin > 0 then table.insert(data.inflections, baybayin) end
--Categorize words in Baybayin
if script:getCode() == "Tglg" then
table.insert(data.categories, "Pangasinan terms in Baybayin script")
end
if pos_functions then
pos_functions(args, data)
end
local content = mw.title.new(PAGENAME):getContent()
return require("Module:headword").full_headword(data) .. require("Module:utilities").format_categories(tracking_categories, lang)
end
local conjugation_types = {
= {"1st actor trigger", "Pangasinan 1st actor focus verbs"}, -- on-/-on-
= { "2nd actor trigger", "Pangasinan 2nd actor trigger verbs" }, --man-
= { "actor trigger potential mood", "Pangasinan 1st actor potential mood verbs" }, -- maka-
= { "actor trigger potential mood", "Pangasinan 2nd actor potential mood verbs" }, -- makapag-
= { "object trigger", "Pangasinan object trigger verbs" }, -- -en
= { "object trigger potential mood", "Pangasinan object trigger potential mood verbs" }, -- ma-
= { "instrument trigger", "Pangasinan instrument trigger verbs" }, -- pag-
= { "instrument trigger potential mood", "Pangasinan instrument trigger potential mood verbs" }, -- mapag-
= { "1st instrument trigger causative mood", "Pangasinan 1st instrument trigger causative mood verbs" }, -- pagpa- -an
= { "2nd instrument trigger causative mood", "Pangasinan 2nd instrument trigger causative mood verbs" }, -- panagpa-
}
pos_functions = function(args, data)
params = {
= {alias_of = 'head'},
= {alias_of = 'perf'},
= {alias_of = 'imperf'},
= {alias_of = 'past_imperf'},
= {alias_of = 'fut'},
head = {list = true},
head2= {},
head3= {},
perf = {list = true},
imperf = {list = true},
past_imperf = {list = true},
fut = {list = true},
rootword = {},
type = {},
type2 = {},
type3 = {},
b= {},
b2= {},
b3= {}
}
local args = require("Module:parameters").process(args,params)
data.heads = args.head
data.id = args.id
local pattern = args.pattern
args.perf.label = "perfective"
args.imperf.label = "imperfective"
args.past_imperf.label = "past imperfective"
args.fut.label = "future"
args.perf.accel = {form = "perf"}
args.imperf.accel = {form = "imperf"}
args.past_imperf.accel = {form = "past|imperf"}
args.fut.accel = {form = "fut"}
if #args.perf > 0 then table.insert(data.inflections, args.perf) end
if #args.imperf > 0 then table.insert(data.inflections, args.imperf) end
if #args.past_imperf > 0 then table.insert(data.inflections, args.past_imperf) end
if #args.fut > 0 then table.insert(data.inflections, args.fut) end
--Tagging verb trigger
local conjtype = args or nil
if conjtype and conjugation_types then
table.insert(data.inflections, {label = conjugation_types})
table.insert(data.categories, conjugation_types)
end
local conjtype = args or nil
if conjtype and conjugation_types then
table.insert(data.inflections, {label = conjugation_types})
table.insert(data.categories, conjugation_types)
end
local conjtype = args or nil
if conjtype and conjugation_types then
table.insert(data.inflections, {label = conjugation_types})
table.insert(data.categories, conjugation_types)
end
end
pos_functions = function(args, data)
--Mark adjective egrees
params = {
= {alias_of = 'head'},
= {alias_of = 'comp'},
= {alias_of = 'sup'},
head = {list = true},
head2= {},
head3= {},
comp = {list = true},
sup = {list = true},
int = {list = true},
b= {},
b2= {},
b3= {}
}
local args = require("Module:parameters").process(args,params)
data.heads = args.head
data.id = args.id
local pattern = args.pattern
args.comp.label = "comparative"
args.sup.label = "superlative"
args.comp.accel = {form = "comparative"}
args.sup.accel = {form = "superlative"}
if #args.comp > 0 then table.insert(data.inflections, args.comp) end
if #args.sup > 0 then table.insert(data.inflections, args.sup) end
end
pos_functions = function(args, data)
--Tagging plurals
params = {
= {alias_of = 'head'},
head = {list = true},
head2= {},
head3= {},
plural = {list = true},
b= {},
b2= {},
b3= {}
}
local args = require("Module:parameters").process(args,params)
data.heads = args.head
data.id = args.id
local pattern = args.pattern
args.plural.label = "plural"
args.plural.accel = {form = "plural"}
if #args.plural > 0 then table.insert(data.inflections, args.plural) end
end
return export