local p = ;
local function checklayer(depth) -- check P131 of items at current depth checklist[depth+1] = -- setup next layer of table local j = 0 for j = 1,#checklist[depth] do -- loop over items at current depth local subclasses = mw.wikibase.getBestStatements(checklist[depth][j],"P131") -- get P131 statements for i,statement in ipairs(subclasses) do -- loop through items at next depth if statement.mainsnak.snaktype
value then isLocated = true else checklist[depth+1][#checklist[depth+1]+1] = newitem -- add item to next depth of checklist table end end end end return isLocatedend
function p.main(frame) local args = frame.args local pargs = frame:getParent.args value = args.value or pargs.value local qid = args.qid or pargs.qid or "" if qid
return p