sparql

SPARQL federated query not working

放肆的年华 提交于 2019-12-08 08:30:35
问题 My basic issue is: I have two computers A and B with Virtuoso installed and I am trying to query from one computer to the next. I created an RDF graph on machine A and executed a query on A to see the locally stored data. sparql SELECT ?a ?b ?c FROM <http://localhost:8890/test> OPTION (get:soft "soft", get:method "GET") WHERE {?a ?b ?c}; It returned the data correctly. I run the following query on machine B sparql SELECT ?a ?b ?c FROM <http://ipAddressOfA:8890/test> OPTION (get:soft "soft",

Fuzzy entity query in Wikidata with Sparql times out

五迷三道 提交于 2019-12-08 08:30:30
I'm trying to do a fuzzy (ie.. partial or case-insensitive) entity label lookup in Wikidata with Sparql (via the online endpoint). Unfortunately these return a " QueryTimeoutException: Query deadline is expired. " I'm assuming this is because the query is returning too many results to run through the filter in Wikidata's 1 minute timeout. Here's the specific query: def findByFuzzyLabel(self, item_label): qstring = ''' SELECT ?item WHERE { ?item rdfs:label ?label . FILTER( lcase(str(?label)) = "%s") } LIMIT 20 ''' % (item_label) results = self.query(qstring) Is there a way to do a partial

Search Multiple Queries from List in SPARQL

最后都变了- 提交于 2019-12-08 07:42:33
问题 I want to find sales data for a set of 300 addresses using the UK Land Registry database. The database permits SPARQL queries, however I am completely new to SPARQL, and do not know how to make multiple queries at once (e.g. search for 300 addresses in one SPARQL query). This is an example land registry query for a single address. So I have two questions: 1) How can I search for multiple addresses in one query? 2) Is there a way to connect a database list of addresses to automate the query?

How to build simple SPARQL query in the right way

孤街浪徒 提交于 2019-12-08 07:27:54
问题 I am novice with SPARQL and DBpedia. I would like to get knowledge of building simple SPARQL queries. Could you please help me to build answer for such questions as: Hometown of footballer (any one), List of Artists, List of Oscar winners (any year) 回答1: I think this question is probably too broad, but in case it's useful, it might make sense to describe how to approach this type of problem. For one of the problems, here's what I did. List of Oscar winners (any year) In this case, I started

Retrieving properties of redirected resource

ⅰ亾dé卋堺 提交于 2019-12-08 06:35:19
问题 How can I retrieve all the properties of http://dbpedia.org/resource/Milano? I tried with this query but I have a few results and I don't understand the reason: select ?prop ?c where {<http://dbpedia.org/resource/Milano> ?prop ?c.} SPARQL results 回答1: The question isn't entirely clear, but expect that the problem you're asking about is why you're getting triples about dbpedia:Milano , but not dbpedia:Milan . This query, as you can see in the results, only returns ten rows: select ?prop ?c

SPARQL not returning correct result

戏子无情 提交于 2019-12-08 06:19:24
问题 There is an RDF file about bird here. I'm trying to run the following sparql on it: PREFIX dc:<http://purl.org/dc/terms/> PREFIX wo:<http://purl.org/ontology/wo/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dc:<http://purl.org/dc/terms/> PREFIX wo:<http://purl.org/ontology/wo/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX foaf:<http://xmlns.com/foaf/0.1/> PREFIX po:<http://purl.org/ontology/po/>

Open world assumption and SPARQL in triple stores

旧时模样 提交于 2019-12-08 06:01:21
问题 I would like to know if SPARQL, by default, adopts the open world assumption or if this depends on the triple stores that execute the SPARQL queries. And what are the implications of this assumption in queries. Best regards. 回答1: Well.... I wonder whether this is really a good question for this site. I think not, but I'm gonna throw a few cents into the bucket anyway. To start with -- does it matter whether SPARQL "adopts" (and what does that mean, to you?) OWA, and, if so, why? Then, to

SPARQL- Retrieving a DBPedia resource by category string

对着背影说爱祢 提交于 2019-12-08 04:57:30
问题 How can I obtain DBpedia resources based on a Wikipedia category? For example, all Japan's islands that have been flooded. A list of possible categories candidates related to "Flood" include: Category:Floods_in_Malaysia Category:Floods_in_Singapore Category:Floods_in_Japan, and many others… I couldn't navigate using SPARQL queries from categories to certain resources. 回答1: One of the easiest ways to figure out what SPARQL query to write against DBpedia is to find a Wikipedia with some of the

Narrowing down on SPARQL query

蓝咒 提交于 2019-12-08 04:57:30
问题 I want to make a query that returns only the items where person1(David) and person2(Charles) appears together. My query is: SELECT ?item ?par ?mod ?hon ?firstName ?lastName WHERE { ?item sci:itemTitle ?title. {?item sci:hasParticipant ?par. {?par sci:firstName "Charles".}UNION{?par sci:firstName "David".}} UNION {?item sci:hasModerator ?mod. {?mod sci:firstName "Charles".}UNION{?mod sci:firstName "David".}} UNION {?item sci:hasGuestOfHonor ?hon. {?hon sci:firstName "Charles".}UNION{?hon sci

example of stardog sparql insert query in java

Deadly 提交于 2019-12-08 04:33:50
问题 Can somebody give one java example of sparql insert/Delete query in Stardog. there is only queryExecution.execSelect() method available. there is no queryExecution.execInsert() or queryExecution.execDelete() available. Please give one working example. EDIT I've found this this from stardog docs page. http://stardog.com/docs/#notes As of 1.1.5, Stardog's SPARQL 1.1 support does not include: UPDATE query language does that means no way out for editing a tuple once entered? 回答1: Stardog does not