[03:21:04] Hi, I have a question [03:21:40] I understand that for a given wikidata item "Q42" say I can get all of its information in the form of a json at https://www.wikidata.org/wiki/Special:EntityData/Q42.json [03:22:14] My intention is to generate triples one for each claim made in the json of entity Q42 [03:22:54] The key values inside the response are pretty confusing mainsnak exists in some cases, doesn't in some other etc [06:18:42] AdityaAS: yes, Wikidata's JSON output is quite complex (because the data model is complex itself) [06:19:50] if you only want to do this for a bunch of entities, you can do this via SPARQL: "DESCRIBE wd:Q42" will give you all the triples it is involved in (see http://tinyurl.com/ya4n6wqz) [06:21:59] if you want to do this at large scale from the dumps, you can do it with Wikidata-Toolkit (but I think the RDF format it uses has diverged from the official format) https://github.com/Wikidata/Wikidata-Toolkit [07:25:10] pintoch: I have the rdf on my local server. I downloaded the Wikidata-Toolkit as well as Wikidata-Toolkit-Example repos but couldn't find an example of extracting all triples corresponding to an entity. Any advice? [07:37:44] you could adapt https://github.com/Wikidata/Wikidata-Toolkit/blob/master/wdtk-examples/src/main/java/org/wikidata/wdtk/examples/RdfSerializationExample.java [07:42:52] but if you already have the RDF dump, then you can just extract triples from it, right? [07:43:21] just index it with your favourite triple store and hit that [07:46:00] pintoch: I want triples corresponding to a particular entity [07:46:04] Say Q42 [07:46:15] yes I get that :) [07:46:47] Basically, we're building a knowledge graph for a specific domain from a corpus (Say a knowledge graph of all cisco devices) [07:47:10] This is our custom knowledge graph indexed on DGraph. We want to make it richer by including some triples from Wikidata [07:47:48] I want the triples in the format [07:48:48] yes. so what's wrong with the solutions I proposed above? [07:49:43] ah. seems like I misunderstood the above statement. Thanks! [08:46:44] Hi, I have one final questions. I got all the triples that I needed. Now I need to convert some of them (a few hundred) into meaningful triples instead of Q42, P400 etc. [08:47:36] Just as I can get info about a Entity from https://en.wikipedia.org/w/api.php?action=query&prop=pageprops&format=json&titles=Q42 [08:47:47] Can I get the name of a property from the wikidata API [08:48:02] Basically a json version of this page [08:48:03] https://www.wikidata.org/wiki/Property:P400 [08:48:07] (for example) [08:51:44] AdityaAS: https://www.wikidata.org/w/api.php?action=wbgetentities&ids=P400 [09:34:06] Thanks pintoch [10:18:59] AdityaAS, pintoch: alternatively, https://www.wikidata.org/wiki/Special:EntityData/P400.json (just like for items) [11:25:38] Lucas_WMDE: Is there an existing mapping between Entity and Property Ids to their strings. Not the one in the dump [11:25:41] ? [11:25:43] Thanks [11:26:10] I don’t know what you mean by “their strings”, sorry – the labels? [11:30:43] yes, their labels [11:35:05] not really [11:35:11] you can use the query service to get labels of some entities [12:07:33] Recoin is easy for researchers. https://www.wikidata.org/wiki/Q37606371 [12:56:49] hello. has anyone studied topical coverage using wikidata? I only know how kittur in his research paper did it [13:51:18] mmecor: relevant category is https://meta.wikimedia.org/wiki/Category:Content_coverage [13:52:21] mmm, i don't see it [13:53:03] i expected something like the 15 most relevant categories, like this: https://www.researchgate.net/figure/Distribution-of-topics-in-Wikipedia-from-January-2008-along-with-change-since-July-2006_fig1_200772878 [13:53:44] this is not very good either [13:53:45] https://www.wikidata.org/wiki/Wikidata:Statistics/Wikipedia/Type_of_content [13:54:22] Yeah, someone still needs to rewrite those scripts. [13:55:06] Anyway, we have https://grafana.wikimedia.org/dashboard/db/wikidata-datamodel-statements?refresh=30m&panelId=3&fullscreen&orgId=1 [13:55:34] these categories are a bit more interesting sjoerddebruin [13:55:51] but not the encyclopedic categories like kittur or halavais [13:56:12] it is a pity [13:58:46] thanks anyway :)) [14:32:06] Hi, does anyone have a script to convert triples in the wikidata dump to triples of labels [14:32:09] ? [15:07:38] xit [16:14:21] !admin block for https://www.wikidata.org/wiki/Special:Contributions/112.96.173.34 please [16:14:21] or not [16:14:21] . [16:14:21] Wiki13: done, there is no bot here for some reason. [16:14:21] But I have a ping on it :) [16:14:21] yeah [16:14:21] oh okay, well thats nice [16:14:21] atleast someone responded [16:14:21] If you know a bot just for pings, let me know. [16:14:22] wmbot does it [16:14:22] It's here. [16:14:22] !admin is Attention requested HakanIST sjoerddebruin [16:14:22] I trust: .*@wikimedia/IWorld (2admin), .*@wikimedia/DangSunM (2admin), .*@quassel\.jefferai\.org (2admin), .*@unaffiliated/jeroendedauw (2admin), .*@wikipedia/Liangent (2trusted), .*@wikimedia/Vogone (2admin), .*@wikipedia/rschen7754 (2admin), .*@wikidata/Lydia-Pintscher-WMDE (2admin), .*@wikipedia/Josve05a (2trusted), .*@wikimedia/Bene (2trusted), .*@wikimedia/-revi (2admin), .*@wikimedia/sjoerddebruin (2admin), .*@wikimedia/*Youngjin (2admin), [16:14:22] @trusted [16:14:22] !admin [16:14:22] Hmm [16:14:22] Sorry, you are not authorized to perform this [16:14:23] bot is down apparently [16:14:31] w a t [16:14:49] what do you want [16:14:56] set a key to ping admins [16:14:59] !admin is Attention requested  HakanIST sjoerddebruin revi [16:14:59] Key was added [16:15:07] I would like a cheeseburger with a large soda please [16:15:07] expect ping [16:15:09] !admin [16:15:09] Attention requested  HakanIST sjoerddebruin revi [16:15:16] sjoerddebruin: visit Korea [16:15:17] and sure [16:15:22] then sure* [16:15:23] The good or bad one? [16:15:34] that.... depends [16:15:58] anyway