wikidata

How to query Wikidata items using its labels?

本小妞迷上赌 提交于 2020-06-09 12:13:48
问题 How can I query Wikidata to get all items that have labels contain a word? I tried this but didn't work; it retrieved nothing. SELECT ?item ?itemLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?item rdfs:label ?itemLabel. } FILTER(CONTAINS(LCASE(?itemLabel), "keyword")) } LIMIT 1000 回答1: Following your question and the useful comments provided, I ended up with this query SELECT ?item ?itemLabel WHERE { ?item rdfs:label ?itemLabel. FILTER(CONTAINS(LCASE(

How to query Wikidata for “also known as”

给你一囗甜甜゛ 提交于 2020-05-27 04:32:12
问题 I would like to know how to query Wikidata by using the alias ("also known as"). Right now I am trying SELECT ?item WHERE { ?item rdfs:aliases ?alias. FILTER(CONTAINS(?alias, "Angela Kasner"@en)) } LIMIT 5 This is simply a query that works if I replace rdfs:aliases by rdfs:labels . I am trying this, because Help:Aliases says that aliases are searchable in the same way as labels, but I can't find any other resource on that nor can I find an example. 回答1: This query might be helpful for someone

get wikidata oldest and latest revision timestamp

依然范特西╮ 提交于 2020-05-17 06:14:48
问题 Yesterday, I asked a question about how to get wikidata oldest and latest timestamp for "Kevin Kratz (Q939047)", someone suggested using API sandbox to create the query like this: oldest timestamp: https://www.wikidata.org/w/api.php?action=query&format=json&list=allrevisions&titles=Kevin%20Kratz&arvprop=ids|timestamp|flags|comment|user&arvlimit=1&arvdir=newer latest timestamp: https://www.wikidata.org/w/api.php?action=query&format=json&list=allrevisions&titles=Kevin%20Kratz&arvprop=ids

get wikidata oldest and latest revision timestamp

时光毁灭记忆、已成空白 提交于 2020-05-17 06:14:07
问题 Yesterday, I asked a question about how to get wikidata oldest and latest timestamp for "Kevin Kratz (Q939047)", someone suggested using API sandbox to create the query like this: oldest timestamp: https://www.wikidata.org/w/api.php?action=query&format=json&list=allrevisions&titles=Kevin%20Kratz&arvprop=ids|timestamp|flags|comment|user&arvlimit=1&arvdir=newer latest timestamp: https://www.wikidata.org/w/api.php?action=query&format=json&list=allrevisions&titles=Kevin%20Kratz&arvprop=ids

get wikipedia id-page using wikidata id

为君一笑 提交于 2020-04-17 21:13:40
问题 Using the sparql query below, I successfully got some of soccer players informations, then I tried to retrieve wikipedia page-id with wikidata Item-id, but it returns an error (java.util.concurrent.TimeoutException): PREFIX wd: <http://www.wikidata.org/entity/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX dbo: <http://dbpedia.org/ontology/> SELECT ?Wikidata_id ?SoccerPlayerLabel ?Team ?TeamLabel ?numMatches ?numGoals ?startTime ?article ?wikipedia_id WHERE { ?Wikidata_id wdt:P106 wd

get wikidata first and last revision timestamp

不问归期 提交于 2020-04-16 02:29:14
问题 I want to get the first and the last revision timestamp of a wikidata Item (for example Kevin Kratz), I tried with the wikidata api: -first timestamp: https://www.wikidata.org/w/api.php?action=query&titles=Kevin+Kratz&prop=revisions&rvdir=newer&rvlimit=1&format=json -last timestamp: https://www.wikidata.org/w/api.php?action=query&prop=revisions&rvlimit=1&rvprop=timestamp&titles=Kevin+Kratz&format=json but it didn't return the timestamps: {"batchcomplete":"","query":{"pages":{"-1":{"ns":0,

get wikidata first and last revision timestamp

ぐ巨炮叔叔 提交于 2020-04-16 02:28:50
问题 I want to get the first and the last revision timestamp of a wikidata Item (for example Kevin Kratz), I tried with the wikidata api: -first timestamp: https://www.wikidata.org/w/api.php?action=query&titles=Kevin+Kratz&prop=revisions&rvdir=newer&rvlimit=1&format=json -last timestamp: https://www.wikidata.org/w/api.php?action=query&prop=revisions&rvlimit=1&rvprop=timestamp&titles=Kevin+Kratz&format=json but it didn't return the timestamps: {"batchcomplete":"","query":{"pages":{"-1":{"ns":0,

Training times for Spacy Entity Linking model

纵饮孤独 提交于 2020-03-18 05:58:29
问题 I'm trying to train a Spacy Entity Linking model using Wikidata and Wikipedia, using the scripts in https://github.com/explosion/spaCy/tree/master/bin/wiki_entity_linking. I've generated the KB and moved to training the model, but that is not done yet after more than a week. How long should that take normally? (I'm not using a GPU) Alternatively, is there a pretrained Wikidata entity linking model I can use? Thanks 回答1: As of October 2019, Spacy does not yet provide a pre-trained model. They