localp={}functionp.check(frame)localtaxonbarExists=require('Module:Taxonbar/exists').checkiftaxonbarExists(frame)==truethenreturn''elselocalresolveEntity=require('Module:ResolveEntityId')localcurrentTitle=mw.title.getCurrentTitle()localcurrentItem=nillocalcategories={'[[Category:Taxobox articles possibly missing a taxonbar]]'--unset if acceptable or unacceptable found}--preliminary exclusion criteriaifstring.match(currentTitle.text,'^List of ')thenreturn''end--find Wikidata itemifcurrentTitle.namespace==0then--mainspacelocalcurrentEntityId=mw.wikibase.getEntityIdForCurrentPage()ifresolveEntity._id(currentEntityId)thencurrentItem=mw.wikibase.getEntity(currentEntityId)else--currentEntityId == nil/unresolvablereturncategories[1]endelsereturn''endifcurrentItemthen--currentItem should not be nil here, but check just in case--determine if {{Taxonbar}} is *definitely* missing, *possibly* missing, or not missing at alllocalwhitelist=require('Module:Taxonbar/whitelist').whitelistlocalblacklist=require('Module:Taxonbar/blacklist').blacklistlocalacceptableInstanceOf_All=whitelist{args={'all'}}localunacceptableInstanceOf=blacklist{args={}}localacceptableCount=0localunacceptableCount=0for_,instanceOfStateinpairs(currentItem:getBestStatements('P31'))do--instance oflocalinstanceOf=instanceOfState.mainsnak.datavalue.value.idifacceptableInstanceOf_All[instanceOf]thenacceptableCount=acceptableCount+1elseifunacceptableInstanceOf[instanceOf]thenunacceptableCount=unacceptableCount+1endendfor_,subclassOfStateinpairs(currentItem:getBestStatements('P279'))do--subclass oflocalsubclassOf=subclassOfState.mainsnak.datavalue.value.idifacceptableInstanceOf_All[subclassOf]thenacceptableCount=acceptableCount+1elseifunacceptableInstanceOf[subclassOf]thenunacceptableCount=unacceptableCount+1endendifacceptableCount>0thencategories[1]=''categories[2]='[[Category:Taxobox articles missing a taxonbar]]'elseifunacceptableCount>0thencategories[1]=''categories[2]=''endreturntable.concat(categories)elsereturn''endendendreturnp