dbpedia

Get all page titles on Wikipedia that contain a specific word

假如想象 提交于 2019-12-14 03:27:57
问题 I am writing an "auto-wikifier" tool using HTML and JavaScript. For each word in the text to be wikified, I need to obtain a list of pages that contain that word (so that the matching phrases in the text can be automatically wikified, if they are found). Is there a way to obtain a list of all Wikipedia pages that contain a specific word, using one of Wikipedia's APIs or web services? function getMatchingPageTitles(theString){ //get a list of all matching page titles for a specific string,

how to use Union/or in sparql path with arbitrary length?

陌路散爱 提交于 2019-12-14 02:19:46
问题 I'm using below query to find all properties with domain of city (or superclasses of city) or range of country (or superclasses of country) from DBPedia ontology. when I use path with fixed length there is no problem but when I put * to define paths with arbitrary length, I get this error: Virtuoso 37000 Error SP031: SPARQL compiler: Variable '_::trans_subj_6_4' is used in subexpressions of the query but not assigned my SPARQL: define sql:signal-void-variables 1 define input:default-graph-uri

Error in SPARQL Query

放肆的年华 提交于 2019-12-13 20:51:46
问题 I'm getting an error with my SPARQL query but can't find it out: Query PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> PREFIX : <http://dbpedia.org/resource/> PREFIX dbpedia2: <http://dbpedia.org/property/> PREFIX dbpedia: <http://dbpedia.org/> SELECT DISTINCT ?lat, ?long { :Taj_Mahal

How to find all Wikipedia pages which are members two given categories using DBpedia?

。_饼干妹妹 提交于 2019-12-13 18:26:31
问题 I dabbled with DBpedia a couple of years ago and find it fascinating, but now that I want to perform a query after not using it for ages, I find it totally impenetrable. What SPARQL query should I issue to retrieve the set of all Wikipedia pages that are members of both "Category ABC" and "Category XYZ"? All of the examples I can find seem to be quite a bit more involved than my seemingly basic question, making it difficult to distil something minimal. (As an example I'd like to find all

Should queries with URIs like http://pt.dbpedia.org/resource/.. be different from the ones with URIs like http://dbpedia.org/resource/..?

两盒软妹~` 提交于 2019-12-13 17:20:54
问题 I'm making that SPARQL query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?label WHERE { <http://pt.dbpedia.org/resource/Brasil> rdfs:label ?label.} and I don't get any results for ?text . I checked that URI on my browser and found the rdfs:label property there. Is that problem caused by the URI form http://pt.dbpedia.org/ ? I've already used the same query with IRIs starting with http://dbpedia.org/resource/ , e.g.,

Disable apache.http.wire DEBUG logs

ぐ巨炮叔叔 提交于 2019-12-13 15:27:07
问题 I'm using Travis CI with my github repo(java project). One of my tests gets data from Dbpedia using SPARQL and Jena. It causes many records i get to be printed in the log into Travis output and thus Travis fails. A log example for instance: 14:52:58.756 [main] DEBUG org.apache.http.wire - http-outgoing-1 << " { "pname": { "type": "literal", "xml:lang": "en", "value": "Yuen Poovarawan" }[0x9], "photo": { "type": "uri", "value": "http://commons.wikimedia.org /wiki/Special:FilePath/Yuen

To write a query SPARQL in Java code using strstarts filter

狂风中的少年 提交于 2019-12-13 09:36:54
问题 I would like to write this SPARQL query in Java using Jena: prefix dbpediaont: <http://dbpedia.org/ontology/> prefix dbpedia: <http://dbpedia.org/resource/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?resource where { dbpedia:Fred_Guy rdf:type ?resource filter strstarts(str(?resource), "http://dbpedia.org/ontology") } I'm using this code: public QueryExecution query(){ String stringa = "http://dbpedia.org/resource/Fred_Guy"; ParameterizedSparqlString qs = new

bif:contain error occurs when try to query dbpedia through my java program

两盒软妹~` 提交于 2019-12-13 08:27:25
问题 the code is for querying dbpedia from java program and then displaying the result in html page package jenaamem; import com.hp.hpl.jena.query.Query; import com.hp.hpl.jena.query.QueryExecution; import com.hp.hpl.jena.query.QueryExecutionFactory; import com.hp.hpl.jena.query.QueryFactory; import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.query.ResultSetFormatter; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; public class db2 { static public void main(String...argv) {

How to get the movies which are based on english novels using SPARQL in DBPEDIA

a 夏天 提交于 2019-12-13 08:14:56
问题 Using SPARQL, I am trying the get the list of all english novels and their properties. I would also like to find if a movie was taken based on that novel and get the movie name and its director, If a movie relationship exists. Code: SELECT ?movie ?director ?book ?author ?publisher ?illustrator WHERE { ?movie dcterms:subject <http://dbpedia.org/resource/Category:films> ; dbpedia-owl:basedOn ?book . ?movie dbp:director ?director . ?book a dbpedia-owl:Book . ?book dbp:author ?author . ?book dbp

Generate an incremental SPARQL query

ε祈祈猫儿з 提交于 2019-12-13 05:24:15
问题 is there any way to generate a SPARQL query in a dynamic way? what I'm trying to do is some thing like this: if I have a DBpedia resource r1 and another DBpedia resource r2, this query SELECT * WHERE { <r1> ?pre <r2> } will return the predicate between the 2 resources and this query SELECT * WHERE { <r1> ?pre1 ?obj1 . ?obj1 ?pre2 <r2> } will return all the predicates and object between these two resources ( in two steps) and so on I'm trying to build this query in such a way that it will