dbpedia

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

how to query Dbpedia in Javascript

半城伤御伤魂 提交于 2020-01-23 09:54:53
问题 I want to get the Abtract of english article of civil engineering from Dbdepdia in Javascript. this is what I tried but it fail. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <style type="text/css"> </style> </head> <script type="text/javascript"> var url = "http://dbpedia.org/sparql"; var query = "\ PREFIX dbpedia2: <http://dbpedia.org/resource/>\ PREFIX Abs: <http://dbpedia.org/ontology/>\ SELECT ?abstract\ WHERE {\ ?s dbpedia2:Civil

Querying DBpedia for English-only description (with SPARQL)

元气小坏坏 提交于 2020-01-22 17:47:05
问题 I'm querying dbpedia.org for a description of Big Ben with this SPARQL query: select ?desc where { <http://dbpedia.org/resource/Big_Ben> <http://www.w3.org/2000/01/rdf-schema#comment> ?desc } This returns a list of descriptions in at least 10 different languages. How do I specify that I only want the English language description? 回答1: The keys you need to know are that str() and lang() pull apart the text and language of the value, so you can do this: select str(?desc) where { <http://dbpedia

Sparql query from Dbpedia and another graph returns less results than expected

吃可爱长大的小学妹 提交于 2020-01-16 18:07:09
问题 I'm a beginner in SPARQL and I'm working on this endpoint http://spcdata.digitpa.gov.it:8899/sparql. I'd like to join data from the DBpedia graph. I'm using the property owl:sameAs for referencing to DBpedia resources. I'd like to fetch the name and population values of all cities falling in the class pa:Comune for which a dbp:populationTotal value is defined. Here is my query: PREFIX pa: <http://spcdata.digitpa.gov.it/> PREFIX rdf: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dbp: <http:/

Sparql query from Dbpedia and another graph returns less results than expected

醉酒当歌 提交于 2020-01-16 18:06:09
问题 I'm a beginner in SPARQL and I'm working on this endpoint http://spcdata.digitpa.gov.it:8899/sparql. I'd like to join data from the DBpedia graph. I'm using the property owl:sameAs for referencing to DBpedia resources. I'd like to fetch the name and population values of all cities falling in the class pa:Comune for which a dbp:populationTotal value is defined. Here is my query: PREFIX pa: <http://spcdata.digitpa.gov.it/> PREFIX rdf: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dbp: <http:/

Query city/state/country abstracts in English

随声附和 提交于 2020-01-16 00:58:30
问题 I am trying to query city, state and country abstracts in English from DBpedia with mixed results. It seems to work well with City and Country but not with State. SELECT * WHERE { ?x rdfs:label "France"@en. ?x dbpedia-owl:abstract ?abstract. FILTER (LANG(?abstract) = 'en') } Or SELECT * WHERE { ?x rdfs:label "Boston"@en. ?x dbpedia-owl:abstract ?abstract. FILTER (LANG(?abstract) = 'en') } However, these queries don't find any results: SELECT * WHERE { ?x rdfs:label "Sao Paulo"@en. ?x dbpedia

DBpedia resource name standard

倾然丶 夕夏残阳落幕 提交于 2020-01-15 11:08:09
问题 Does DBpedia name have any standard or convention? By that, I mean, e.g., United Kingdom has a resource named United_Kingdom . But I'm seeing that the fact of having an underscore and having each word being capitalized doesn't hold. For instance, take University_of_Manchester ; if you type it as University_Of_Manchester with a capital ‘O’ in “of,” you won't get the resource. Is it obligatory to do a filtering to get the resource name in the proper case, because we may want to make all letters

DBpedia SPARQL filter does not apply to all results

六月ゝ 毕业季﹏ 提交于 2020-01-14 13:55:08
问题 A FILTER NOT EXISTS allows some results through when combined with OPTIONAL triples. My query: SELECT DISTINCT * WHERE { { ?en rdfs:label "N'Djamena"@en . BIND("N'Djamena" AS ?name) . } UNION { ?en rdfs:label "Port Vila"@en . BIND("Port Vila" AS ?name) . } UNION { ?en rdfs:label "Atafu"@en . BIND("Atafu" AS ?name) . } FILTER NOT EXISTS { ?en rdf:type skos:Concept } . OPTIONAL { ?en owl:sameAs ?es . FILTER regex(?es, "es.dbpedia") . } OPTIONAL { ?en owl:sameAs ?pt . FILTER regex(?pt, "pt

DBpedia SPARQL filter does not apply to all results

廉价感情. 提交于 2020-01-14 13:54:27
问题 A FILTER NOT EXISTS allows some results through when combined with OPTIONAL triples. My query: SELECT DISTINCT * WHERE { { ?en rdfs:label "N'Djamena"@en . BIND("N'Djamena" AS ?name) . } UNION { ?en rdfs:label "Port Vila"@en . BIND("Port Vila" AS ?name) . } UNION { ?en rdfs:label "Atafu"@en . BIND("Atafu" AS ?name) . } FILTER NOT EXISTS { ?en rdf:type skos:Concept } . OPTIONAL { ?en owl:sameAs ?es . FILTER regex(?es, "es.dbpedia") . } OPTIONAL { ?en owl:sameAs ?pt . FILTER regex(?pt, "pt

Query DBpedia to get meta-data for Books

江枫思渺然 提交于 2020-01-14 12:39:51
问题 I have a bunch of ISBN's. I want to query DBpedia and get the meta-data of the books. I am unable to understand the SPARQL . Can someone tell me how can I get the meta-data of a book from DBpedia in Java? 回答1: SPARQL is both a query language and a protocol to query so-called SPARQL endpoints . A SPARQL query that asks DBpedia for a book (or books) that have the ISBN 0-553-05250-0, and its (or their) associated properties and values is this: select distinct ?book ?prop ?obj where { ?book a dbo