sparql

Passing Multiple Arguments to GraphQL Query

旧城冷巷雨未停 提交于 2019-12-05 19:26:14
问题 First thing Appreciate this may be a bit of a stupid question, but I'm working with GraphQL having come from the RDF/Linked Data world and having a lot of trouble getting my head around how I would return a set. Essentially I want something where I could select, let's say a list of Characters (using the examples from the GraphQL docs) via their id . In SPARQL I'd be using the VALUES clause and then binding, something like: VALUES { <http://uri/id-1> <http://uri/id-2> <http://uri/id-3> } I'd

SPARQL 1.1 entailment regimes and query with FROM clause

倾然丶 夕夏残阳落幕 提交于 2019-12-05 18:44:52
I'm currently documenting/testing about SPARQL 1.1 entailment regimes and the recommendation repeatedly states that The scoping graph is graph-equivalent to the active graph but it does not specifies what is the active graph referring to : is it the data-set used in the query ? a union of all graphs in the store ? As a test to determine this , I got this graph URIed <http://www.example.org/> in a Sesame Memory store with RDF Schema and direct type inferencing store (v2.7.14) @prefix ex:<http://www.example.org/> . ex:book1 rdf:type ex:Publication . ex:book2 rdf:type ex:Article . ex:Article rdfs

how to query Dbpedia in Javascript

风流意气都作罢 提交于 2019-12-05 18:38:15
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_engineeringe\"@en;\ Abs:abstract ?abstract\ }"; this how I encode the url to pass it to ajaxx var

How can we create custom template using grmm inbuilt class in mallet?

纵饮孤独 提交于 2019-12-05 18:37:35
I am new to mallet and currently working on Sparql query optimization using template based model. For this i wanted to create a template model from RDf graph. The three templates which i want to create is class, attribute and relation. i have come across this tool called mallet which can help me to create a template. but still i am not getting an idea how can i do so using ACRF.Template in grmm.Can someone please give me guidelines about the template creation using mallet. See the below image. I want a (1) class template for example movie all entities belonging to movie are included. (2) an

DBpedia SPARQL Query US Universities

喜欢而已 提交于 2019-12-05 18:17:59
I created a SPARQL query that I'm running on the DBpedia SNORQL SPARQL endpoint . The purpose of the query is to get a list of universities or colleges in the United States, including their longitude, latitude, and endowment. The query seems to be working but seems to be missing some records and/or attributes. So, for example, Harvard University doesn't show up in the result, even though its DBpedia record exists and the attributes should match my query. I'm not sure why that record doesn't show up. Another example is University of Massachusetts Boston , which comes up as a query result, but

How do I get started with Sparql as a .NET Developer?

最后都变了- 提交于 2019-12-05 17:51:40
问题 I'm trying to parse Project Gutenberg's large RDF file. Another member of my team is pretty stuck, having tried Semweb and a python library. Being a little naive about rdf, I tried to write a plain ol' xml parsing script in Ruby. I soon realized it was too complex to really work. I've downloaded Intellidimension's tool and am thinking of using it. I guess I don't understand how to use SPARQL. It seems there is a parser in Java called Jena. Is there something like that in .NET? Sorry for the

Saving and reusing the result of a SPARQL query

南笙酒味 提交于 2019-12-05 17:48:49
I am using Jena to query an owl file through Eclipse. I want to do some successive queries and every new query will use the results of the previous query. I want to do it in different ?SELECT and save every time the result of a query in order to use it again in a new query. I dont want to insert the values of the variables by myself but automatically occur from the queries. Any ideas whats a suitable way to achieve this? Thanks in advance I think that there are two primary options here: a . if you're interested in just one QuerySolution from a ResultSet and you're running these queries locally

How to change upper execution time limit for a DBpedia SPARQL query? (Virtuoso 42000 error)

社会主义新天地 提交于 2019-12-05 15:15:00
I am querying DBpedia using SPARQL through Python. I am facing issues with the upper execution time limit. This is the error : Code : sparql = SPARQLWrapper("http://dbpedia.org/sparql") newquery = "DEFINE input:inference "skos-trans" PREFIX dcterms: <http://purl.org/dc/terms/> select distinct ?cat1 ?cat2 ?cat3 ?cat4 where { <http://dbpedia.org/resource/Pulp_Fiction> dcterms:subject ?cat1 . ?cat1 skos:broaderTransitive ?cat2. ?cat2 skos:broaderTransitive ?cat3. ?cat3 skos:broaderTransitive ?cat4. } " sparql.setQuery( newquery) sparql.setReturnFormat(JSON) results = sparql.query().convert()

Encoding problems with R XML via SPARQL

痴心易碎 提交于 2019-12-05 12:57:54
I running into an encoding problem with the SPARQL package for R. I'm running the following code: library(SPARQL) rights_query <- ' PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX edm: <http://www.europeana.eu/schemas/edm/> PREFIX ore: <http://www.openarchives.org/ore/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT DISTINCT ?edmrights ?provider (COUNT(*) as ?count) WHERE { ?agg rdf:type ore:Aggregation . ?agg edm:rights ?edmrights . #?agg dc:rights ?dcrights . ?agg edm:dataProvider ?provider . ?proxy ore:proxyIn ?agg . ?proxy edm:type "IMAGE" . } GROUP BY

Single quad + most basic SPARQL query = 1 result in Jena, 2 results in Sesame - who is right?

人走茶凉 提交于 2019-12-05 11:16:01
Add just this one quad to an empty store: <http://x.com/s> <http://x.com/p> 2 <http://x.com/g> . Then execute this SPARQL query (taken from per Bob DuCharme's book 'Learning SPARQL', so this must be standard SPARQL for retrieving all quads across the dataset, regardless of implementation, right!?): SELECT ?g ?s ?p ?o WHERE { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } } But Jena and Sesame reply with different answers!!? Here's what I see: Jena Fuseki console on Tomcat 6.0.37 (version 2.10.0 - out-of-the-box, no configuration changes!) - (the correct answer as I understand things): ----------