Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-17 Thread Thad Guidry
Kingsley, Hmm. I am actually not sure about the preamble. That is something you will have to discuss with DanBri on the Schema.org mailing list. Thad +ThadGuidry ___ Wikidata mailing list Wikidata@lists.wikimedia.o

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-17 Thread Kingsley Idehen
On 10/17/16 3:03 PM, Thad Guidry wrote: > Kingsley, > > The http://pending.schema.org namespace will show up as this in RDF Turtle > > ns1:Q1251750 owl:equivalentClass ns3:Distillery . > and this way in JSON-LD > > { > > * > @id: "http://www.wikidata.org/entity/Q1251750";, > * > equi

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-17 Thread Kingsley Idehen
On 10/17/16 2:45 PM, Thad Guidry wrote: > Nice Kingsley! Great work. So nowthe bad news and where we need > further help still :) > > I do want to let everyone know however that within Classes and > Properties...there are a slight few mappings that were taken as an > opinionated view > > I.E.

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-17 Thread Thad Guidry
Oops ! one more thing about the mappings that I forgot to mention to all. Which is very important. http://pending.schema.org That is were schema.org holds its work-in-progress or review of a draft idea for Classes (Types) and Properties. We have already mapped several of them that are currently

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-17 Thread Thad Guidry
Kingsley, The http://pending.schema.org namespace will show up as this in RDF Turtle ns1:Q1251750owl:equivalentClass ns3:Distillery . and this way in JSON-LD { - @id: "http://www.wikidata.org/entity/Q1251750";, - equivalentClass: "http://pending.schema.org/Distillery"; }, Thad

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-17 Thread Thad Guidry
Nice Kingsley! Great work. So nowthe bad news and where we need further help still :) I do want to let everyone know however that within Classes and Properties...there are a slight few mappings that were taken as an opinionated view I.E. they may slightly conflict with other views of the ma

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-17 Thread Kingsley Idehen
On 10/11/16 2:48 PM, Thad Guidry wrote: > Kingsley, > > You might ask others on the list who could help more with providing > the WD - Schema.org mappings or get them into a format that you > want...or an RDF dump file. > > I just don't have the knowledge to assist you with that via SPARQL. > (i.e

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-12 Thread Kingsley Idehen
On 10/11/16 2:23 PM, Thad Guidry wrote: > Kingsley, > > You might ask others on the list who could help more with providing > the WD - Schema.org mappings or get them into a format that you > want...or an RDF dump file. > > I just don't have the knowledge to assist you with that via SPARQL. > (i.e

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-11 Thread Thad Guidry
Kingsley, You might ask others on the list who could help more with providing the WD - Schema.org mappings or get them into a format that you want...or an RDF dump file. I just don't have the knowledge to assist you with that via SPARQL. (i.e., I am not a SPARQL guru) -Thad

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-11 Thread Thad Guidry
Kingsley, You might ask others on the list who could help more with providing the WD - Schema.org mappings or get them into a format that you want...or an RDF dump file. I just don't have the knowledge to assist you with that via SPARQL. (i.e., I am not a SPARQL guru) On Tue, Oct 11, 2016 at 1

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-11 Thread Kingsley Idehen
On 10/10/16 5:31 PM, Thad Guidry wrote: > Kingsley, > > use shortcut syntax instead. Also look at how the many examples show > doing tihngs. > http://tinyurl.com/hkv8z7m Thad, Not getting the point you are trying to articulate i.e., the solution isn't comprised strictly of

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-10 Thread Thad Guidry
Kingsley, use shortcut syntax instead. Also look at how the many examples show doing tihngs. http://tinyurl.com/hkv8z7m On Mon, Oct 10, 2016 at 1:50 PM Kingsley Idehen wrote: > On 10/9/16 1:34 PM, Thad Guidry wrote: > > Kingsley, > > The mappings are already in Wikidata (we still have a few p

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-10 Thread Kingsley Idehen
On 10/9/16 1:34 PM, Thad Guidry wrote: > Kingsley, > > The mappings are already in Wikidata (we still have a few properties > left to map, but the classes are done, except for a few in > pending.schema.org . You can just query > them in some fashion such as this: http://

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-10 Thread Thad Guidry
Thanks Andrew but I know and see the pitfalls. The use case is only 1 level deep and to be treated not as a Category but instead as simply something "Related" or "Relative" to the topic. Keeping within those 2 constraints from my tests seems to work reasonably well. Beyond those constraints... I a

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-10 Thread Andrew Gray
Hi Thad, One quick red flag - I'm not sure how familiar you are with the category system, but automatically parsing it without sanity-checking can very quickly lead you into a minefield. There are a substantial number of category trees which seem reasonable at first, but rapidly go in unexpected d

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-09 Thread Thad Guidry
Kingsley, The mappings are already in Wikidata (we still have a few properties left to map, but the classes are done, except for a few in pending.schema.org. You can just query them in some fashion such as this: http://tinyurl.com/h9vjqd8 On Sun, Oct 9, 2016 at 11:09 AM Kingsley Idehen wrote:

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-08 Thread Kingsley Idehen
On 10/6/16 2:57 PM, Thad Guidry wrote: > Hello team :) > > So while I'm helping with the Wikidata - Schema.org mappings, a > request came in to expose subcategories of an existing Wikipedia category. > > For example, say I start with this > topic: https://www.wikidata.org/wiki/Q27119725 Parking fa

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-06 Thread Gerard Meijssen
Hoi, Magnus does use subcategories extensively in his tools. It is not WDQS but it is data. Be warned, many of the "lists" and "categories" in Wikidata are not only this but are reused for other purposes. Thanks, GerardM On 6 October 2016 at 20:57, Thad Guidry wrote: > Hello team :) > > So

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-06 Thread Denny Vrandečić
DBpedia has the category data in RDF. The last release of DBpedia also included Wikidata - it should be possible to query the combined dataset there. On Thu, Oct 6, 2016, 19:47 Thad Guidry wrote: > Cool. Yeap, you got the idea now. > > OK, We'll stay tuned for a future new Service ! > > Schema.

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-06 Thread Thad Guidry
Cool. Yeap, you got the idea now. OK, We'll stay tuned for a future new Service ! Schema.org and Google and the World thank you Stas :) On Thu, Oct 6, 2016 at 8:39 PM Stas Malyshev wrote: > Hi! > > > This is what I was thinking would have already been integrated into > > Wikidata somehow, so

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-06 Thread Stas Malyshev
Hi! > 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 > subcategor

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-06 Thread Thad Guidry
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 ? h

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-06 Thread Thad Guidry
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

Re: [Wikidata] Help with SPARQL or API or something to get subcategories

2016-10-06 Thread Stas Malyshev
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: