blazegraph

Does Blazegraph support range query optimization?

谁说我不能喝 提交于 2021-01-29 06:41:01
问题 I am playing with Blazegraph. I insert some triples representing 'events', each of 'event' contains 3 triples and looks like this: <%event-iri%> <http://predicates/timestamp> '2020-01-02T03:04:05.000Z'^^xsd:dateTime . <%event-iri%> <http://predicates/a> %RANDOM_UUID% . <%event-iri%> <http://predicates/b> %RANDOM_UUID% . Timestamps represent consecutive moments of time, each next event is 1 minute later than the previous one. I made two sets of tests: once having 1 million events (so 3 million

Grouping by blank nodes

拥有回忆 提交于 2020-03-03 05:41:21
问题 I have the following data: @prefix f: <http://example.org#> . _:a f:trait "Rude"@en . _:a f:name "John" . _:a f:surname "Roy" . _:b f:trait "Crude"@en . _:b f:name "Mary" . _:b f:surname "Lestern" . However, if I execute the following query in Blazegraph : PREFIX f: <http://example.org#> SELECT ?s ?o WHERE { ?s f:trait ?o . } I get six results: s o t32 Crude t37 Crude t39 Crude t31 Rude t36 Rude t38 Rude If blank nodes _:a and _:b are distinct nodes, how should I write a SPARQL query to

What are values starting with “t” and how to ignore them for counting

牧云@^-^@ 提交于 2019-12-22 18:36:45
问题 I am trying to query the frequency of certain attributes in Wikidata, using SPARQL. For example, to find out what the frequency of different values for gender is, I have the following query: SELECT ?rid (COUNT(?rid) AS ?count) WHERE { ?qid wdt:P21 ?rid. BIND(wd:Q5 AS ?human) ?qid wdt:P31 ?human. } GROUP BY ?rid I get the following result: wd:Q6581097 2752163 wd:Q6581072 562339 wd:Q1052281 223 wd:Q1097630 68 wd:Q2449503 67 wd:Q48270 36 wd:Q44148 8 wd:Q43445 4 t152990852 1 t152990762 1

transform my rdf file to a named graph file

梦想与她 提交于 2019-12-11 12:49:13
问题 For a project I have to use Apache Jena as an API and Blazegraph as a triple store, I am trying to program a code that allows me to transform my dataset (N-Triples File) to a file that contains the NamedGraph of each statement. String APIUrl = "http://localhost:9999/bigdata/namespace/drugbank/sparql"; String req = "select * WHERE {?x ?y ?z}"; RDFConnection conn = RDFConnectionFactory.connect(APIUrl); FileManager.get().addLocatorClassLoader(Main.class.getClassLoader()); Model model =

comparing labels in a federated query

空扰寡人 提交于 2019-12-11 07:08:10
问题 I have an instance of Wikibase running. I'm able to run federated queries with Wikidata successfully. I have certain queries that compare labels like this: PREFIX xwdt: <http://www.wikidata.org/prop/direct/> PREFIX xwd: <http://www.wikidata.org/entity/> PREFIX xpq: <http://www.wikidata.org/prop/qualifier/> PREFIX xps: <http://www.wikidata.org/prop/statement/> PREFIX xp: <http://www.wikidata.org/prop/> select ?item ?wditem ?itemLabel ?wid ?wditemlabel where { ?item wdt:P17 wd:Q39. ?item wdt

Wikidata on local Blazegraph : Expected an RDF value here, found '' [line 1]

吃可爱长大的小学妹 提交于 2019-12-11 01:26:01
问题 We (Thomas and Wolfgang) have installed locally wikidata and blazegraph following the instruction here : https://github.com/wikimedia/wikidata-query-rdf/blob/master/docs/getting-started.md The mvn package command was successful [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent ............................................. SUCCESS [ 54.103 s] [INFO] Shared code ........................................ SUCCESS [ 23.085 s

GAS API implementation and usage

你说的曾经没有我的故事 提交于 2019-12-10 11:20:05
问题 I'm trying to learn and use the GAS API to implement a Random Walk over my database, associating every visited vertex to the starting vertex. I'm having some issues understanding how I can manage to do this; I've been reviewing the PATHS, BFS, PR, and other GAS classes as examples, but I'm not quite sure how to start. I think my implementation should extend BaseGASProgram and implement the needed methods. Also, as iterative, the frontier contains all the vertexes of the current iteration. The

Why is owl:Restriction reasoning not working in Blazegraph?

一笑奈何 提交于 2019-12-08 08:04:16
问题 With the following RDF in Blazegraph (taken from this answer): :eats rdf:type owl:ObjectProperty . :Vegetable rdf:type owl:Class ; rdfs:subClassOf owl:Thing . :Vegetarian rdf:type owl:Class ; owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :eats ; owl:someValuesFrom :Vegetable ] . :Carrot rdf:type :Vegetable , owl:NamedIndividual . :John rdf:type owl:NamedIndividual , owl:Thing ; :eats :carrot . the following SPARQL is returning blank: select ?who where { ?who a :Vegetarian .

What are values starting with “t” and how to ignore them for counting

喜你入骨 提交于 2019-12-06 15:09:39
I am trying to query the frequency of certain attributes in Wikidata , using SPARQL. For example, to find out what the frequency of different values for gender is, I have the following query: SELECT ?rid (COUNT(?rid) AS ?count) WHERE { ?qid wdt:P21 ?rid. BIND(wd:Q5 AS ?human) ?qid wdt:P31 ?human. } GROUP BY ?rid I get the following result: wd:Q6581097 2752163 wd:Q6581072 562339 wd:Q1052281 223 wd:Q1097630 68 wd:Q2449503 67 wd:Q48270 36 wd:Q44148 8 wd:Q43445 4 t152990852 1 t152990762 1 t152990752 1 t152990635 1 t152775383 1 t152775370 1 t152775368 1 ... I have the following questions regarding

GAS API implementation and usage

橙三吉。 提交于 2019-12-06 10:16:44
I'm trying to learn and use the GAS API to implement a Random Walk over my database, associating every visited vertex to the starting vertex. I'm having some issues understanding how I can manage to do this; I've been reviewing the PATHS, BFS, PR, and other GAS classes as examples, but I'm not quite sure how to start. I think my implementation should extend BaseGASProgram and implement the needed methods. Also, as iterative, the frontier contains all the vertexes of the current iteration. The concept of predecessor is also clear to me. But I don't think that I understand very well the Gather,