Behind the <P812 : academic major> Property

1 min read Original article ↗

This morning, I stumbled upon this Wikidata error.

I wanted to fix it, but I did not know how.

I wish there were an "intelligent autocorrect" feature built into Wikidata that could suggest a quick fix for situations like this. Modern IDEs already have such features.

Anyway. So, I started thinking of several ways to solve the problem.

One of my proposed solutions was to do a quick “global survey of Wikidata-wide usage” of P812 (academic major). Generate a list of all possible "legal" values of P812, then sort them by frequency.

So, I crafted this SPARQL query.

Using that SPARQL query, I could generate this list.

Satisfactory?

No.

I felt something big was missing.

That query only counted direct statements.

I also needed to count the other case.

So, I crafted another SPARQL query.

But the Wikidata Query Service failed to execute it due to an upstream request timeout.

So, I modified the SPARQL query so it could be executed in QLever.

It worked.

Now, I can simply browse that list to see what kinds of "academic major" values are considered valid to enter into Wikidata.

Discussion about this post

Ready for more?