dbpedia

dbpedia spotlight dataset

拜拜、爱过 提交于 2019-12-11 07:37:19
问题 I installed the DBpedia Spotlight from http://spotlight.dbpedia.org/download/release-0.5/dbpedia-spotlight-quickstart.zip and wanted to improve its dataset by downloading from https://github.com/dbpedia-spotlight/dbpedia-spotlight/wiki/Downloads. Can someone tell me how to use the data from spotter lexicon and disambiguation index with the jar files. 回答1: Assuming you have already downloaded and decompressed the files below: wget http://spotlight.dbpedia.org/download/release-0.5/context-index

Handling commas when using a namespace PREFIX in a Sparql WHERE clause

早过忘川 提交于 2019-12-11 06:15:13
问题 I am trying to query the skos:broader property for the DBPedia category "Diseases_of_oral_cavity,_salivary_glands_and_jaws". This category is available at the following URI: http://dbpedia.org/resource/Category:Diseases_of_oral_cavity,_salivary_glands_and_jaws The following query provides the desired output: PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT ?broaderCategory WHERE { <http://dbpedia.org/resource/Category:Diseases_of_oral_cavity,_salivary_glands_and_jaws> skos:broader

Query both DBPedia and Wikidata at the same time?

☆樱花仙子☆ 提交于 2019-12-11 05:45:31
问题 Is there a way to query both DBPedia and Wikidata at the same time? Like any way to query all the people in DBPedia and Wikidata at the same time? PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX dbo: <http://dbpedia.org/ontology/> { SELECT ?person WHERE { ?person wdt:P31 wd:Q5 } limit 100 } UNION { SELECT * { ?person a dbo:Person } } Try here 回答1: Thanks to @AKSW I got the answer to my question. The Federated SPARQL queries would do the

How can I match string labels from an external SPARQL endpoint with string labels in my local ontology?

倖福魔咒の 提交于 2019-12-11 05:19:47
问题 PREFIX ex: <http://www.semanticweb.org/caeleanb/ontologies/twittermap#> PREFIX dbo: <http://dbpedia.org/ontology/> SELECT ?name (STR(?name) AS ?strip_name) ?name2 WHERE { ?p ex:displayName ?name2 . SERVICE <http://dbpedia.org/sparql> { { ?s rdfs:label ?name . ?s rdf:type foaf:Person . } UNION { ?x rdfs:label ?name . ?x dbo:wikiPageRedirects ?s . } } FILTER(STR(?name) = ?name2) . } This is the SPARQL query that I am sending to my Stardog SPARQL endpoint (hosted locally). I know a bunch of the

SPARQL: extract distinct values from dbpedia

我是研究僧i 提交于 2019-12-11 04:44:45
问题 I want to extract graphs for 5 individuals who are Film(or movies) from DBPedia. My query is: ParameterizedSparqlString qs = new ParameterizedSparqlString( "" + "construct{?s ?p ?o}"+ "where{?s a http://dbpedia.org/ontology/Film ."+ "?s ?p ?o"} OFFSET 0 LIMIT 5" ); I get the following result: 1- http://dbpedia.org/resource/1001_Inventions_and_the_World_of_Ibn_Al-Haytham http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dbpedia.org/ontology/Film . 2- http://dbpedia.org/resource/1001

List countries from DBpedia

♀尐吖头ヾ 提交于 2019-12-11 01:45:23
问题 Trying to query DBpedia for a list of all countries with the dbo:longName property and the capital of each country listed but get 0 results returned. Can't see whats wrong with the query. PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT ?country ?capital WHERE { ?country a dbo:longName ; dbo:capital ?capital . } What's missing? 回答1: You are missing that ?country has a rdf:type of dbo:Country and not dbo:longName . The right query should be: PREFIX

Virtuoso SPARQL endpoints inference rules

白昼怎懂夜的黑 提交于 2019-12-11 01:35:47
问题 When using an endpoint that is hosted in Virtuoso , (like DBpedia endpoint), there are a predefined set of rules that can be used (accessible through the Inference rules link on the top right). If I need to use one of these rules I can include as the following within the query space at the endpoint: define input:inference 'ldp' However, when I try to include an external inference rules set, which is not predefined at the previous list, it triggers an error, as the following: define input

SPARQL queries doesn't works without LIMIT clause

吃可爱长大的小学妹 提交于 2019-12-11 01:28:06
问题 When I execute this sentence in the nobel prize database I got error when I avoid use LIMIT clause. The next query works, because it has the LIMIT clause: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX nobel: <http://data.nobelprize.org/terms/> PREFIX cat: <http://data.nobelprize.org/resource/category/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/>

How to build correct SPARQL Query

廉价感情. 提交于 2019-12-11 01:06:28
问题 I need to get all players who have ever played for football team using SPARQL query and dbpedia.org I can get current team members using http://dbpedia.org/sparql and this query: PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX p: <http://dbpedia.org/property/> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> SELECT * WHERE { <http://dbpedia.org/resource/Manchester_United_F.C.> p:name ?player. ?player dbpedia-owl:birthPlace ?city; dbpedia-owl:birthDate ?dob. } How to get all

Why is this SPARQL query not returning any results?

雨燕双飞 提交于 2019-12-10 17:38:46
问题 Runninng this query through the DBpedia SPARQL endpoint gets me many results (with the institution column populated): select ?person ?field ?institution where { ?person a dbpedia-owl:Agent . OPTIONAL { ?person dbpprop:workInstitution ?institution . } OPTIONAL { ?person dbpprop:workInstitutions ?institution .} ?person dbpprop:field ?field . } However, adding the line FILTER(BOUND(?institution)) returns an empty result set: select ?person ?field ?institution where { ?person a dbpedia-owl:Agent