Stas,

This is what I was thinking would have already been integrated into Wikidata somehow, somewhere, ideally as a SERVICE to call in SPARQL if there were any Category Labels , maybe another serviceParam for the label Service that could take another serviceParam to retrieve the subcategories ?

https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&list=categorymembers&cmtitle=Category%3AParking+facilities&cmtype=subcat


On Thu, Oct 6, 2016 at 8:08 PM Thad Guidry <thadguidry@gmail.com> wrote:
Thanks Stas,

So, hmm...we'd have to build our own parser or something is what your saying ?
Because Wikidata doesn't have those kinds of connections in its graph and also doesn't have a SPARQL service yet against the Wikipedia API:Categorymembers https://www.mediawiki.org/wiki/API:Categorymembers to deduce those subcategories, right ?

How difficult is it for someone to create a service like the LabelService , but instead using the WP Categorymembers API ?  Or do you have some other ideas ?


On Thu, Oct 6, 2016 at 6:10 PM Stas Malyshev <smalyshev@wikimedia.org> wrote:
Hi!

> Can it all be done in SPARQL against some services that already expose
> WP subcategories given a specific category ?  Or is there an API that
> does this already ?  other tools that might expose WP categories ?

I don't think subcategory relationship is not recorded in Wikidata. E.g.
https://www.wikidata.org/wiki/Q7361750 contains
https://www.wikidata.org/wiki/Q14436424 but neither have any indication
of that.
The problem I guess is that category hierarchy is different on all
wikis, so it's hard to have one property that expresses it on Wikidata.

You could do through "subclass of" and "category's main topic" but not
sure that'd capture all. E.g.: http://tinyurl.com/h7qpcdn but that only
captures one subcategory, since other items don't have the same
hierarchy in Wikidata.
--
Stas Malyshev
smalyshev@wikimedia.org

_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata