Page categories are a non-trivial polyhierarchy, in other words the data is very dirty.
- Is it possible to find the subcategory of https://de.wikipedia.org/wiki/Kategorie:Sachsystematik which best fits a random dewiki article?
- Does enterprise dump html include any information about categories?
- Can the category API or DeepCat or the SPARQL category graph be used to connect page categories with Sachsystematik?
We probably wouldn't make API calls for every article during the scraper run, but would run this only on the smaller sample of articles with similar refs, in a later step.
The technology exists. It's just a question how we can use it efficiently. A trivial approach is to run the search API for every (potential) page combined with every category, like this: https://de.wikipedia.org/wiki/Special:Search/pageid:6646256_deepcat:Literatur. This should be reasonably cheap. If the query returns the page we know it's part of the given category (sub-tree), or not.