It may be that Wikidata has a lot of general classes, but this is unavoidable I think if Wikidata is going to store a lot of different kinds of information.  (This is not to say that there are not problems in the Wikidata class hierarchy.)

For example one of the objects that the mayor of Madison is related to is the United States of America.   There are 82 different classes that can be reached by following instance of and then zero or more subclass links.  But there are 8 different classes that the United States of America is a direct instance of.  If there are any classes that do not belong in the 82 then it is not because they are general classes (object, entity) it is because there are suspect generalization links.  For example, how does the United States of America get to be a set?  Or a geographical feature? 


There are a few classes that are suspect in this list, particularly three SOMA classes.  I don't see why Wiikidata should have SOMA classes that should just mirror regular Wikidata classes.


peter




On 12/23/22 18:47, Erik Paulson wrote:
The Wikidata subclass of ontology/taxonomy is unfortunately a lot of true-but-unhelpful info if you do some inferencing. 

Subclassing in particular is not very useful. As an example, let's take the Mayor of Madison, WI - for any property we say about her, what are the classes and superclasses of the target of that, e.g. we say that she's a Mayor, what classes are 'Mayor' a member of? 

SELECT distinct ?p ?pLabel ?item ?itemLabel ?itemClass ?itemClassLabel
WHERE
{
  wd:Q63039729 ?p ?item. # Q63039729 is the current mayor of madison
  OPTIONAL {?item wdt:P31/wdt:P279* ?itemClass . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language
} order by (?item)

This query comes back with 562 classes, most of which are upper-ontology statements that are really not very useful at best and in some cases almost feel like they're so irrelevant as to make the whole exercise pointless - for example, 
  • via some subclass path in wikidata, we learn that  'United States of America' is a member of the classes 'agent', 'matter', 'set', and 'astronomical body part'. 
  • The Mayor's first name is 'Satya', which is a member of the classes 'data', 'information', 'series', 'non-physical entity', 'multiset', and a 'mathematical object', among others.  
  • She was educated at 'Smith College', which (I'm happy to learn from wikidata) is a member of the class '3 dimensional objects'. 
  • The mayor is the first gay mayor of Madison, and it turns out according to wikidata 'lesbianism' is a member of the class 'occurence', 'spatio-temporal entity', and more.
So while I guess an auxiliary database with inferences from wikidata would be neat, I think it'd be a lot of noise and I'm not sure all that useful in practice.

I do wish that there was some support in wikibase to know more about classes and instances - so if you add a P31 instanceOf property to an item or a P279 subClassOf to a class, Wikibase tells you "BTW, you're also saying that your thing is also an instance of all of these classes/your class is now a subclass of all these other classes too"

-Erik