How do you determine whether a triple from a query result has been inferred?

2021-12-05 Thread Simon Gray
I would like to display inferred triples differently in my UI, but I’m unsure how to programmatically ascertain which triple is from inference and which is raw data. The only way I can think of that might work would be to make a secondary look-up in the raw data graph and compare the difference

Re: Re: OWL inferences in Apache Jena (for e.g. owl:allValuesFrom)

2021-12-05 Thread Lorenz Buehmann
 @Steve Which reasoner are you using?  Have you tried openllet (Pellet for Jena) to see if you get the desired result? works only with Jena 3.X Which reasoner are you using?  Have you tried openllet (Pellet for Jena) to see if you get the desired result? that look like a mix of Manchester

Re: Apache Jena rules to find the minimum in a list of data property values

2021-12-05 Thread Luis Enrique Ramos García
Hi dear, The issue here is the monotonic level of owl, with sparql functions you can get this information, but with owl based rules, or inference not (in a set larger than 2). The point is that to get that the reasoner (or function) should create a list, order it and extract the first or last

Re: OWL inferences in Apache Jena (for e.g. owl:allValuesFrom)

2021-12-05 Thread Luis Enrique Ramos García
Hi, If I properly understand your notation, you are try to obtain an instance as an inferred class. In this case is CatPerson, a person who only has a pet of kind cat. And, as I see you defined person_1, and you say he has a cat, then you expect the system to infer he is a cat person, and

Re: OWL inferences in Apache Jena (for e.g. owl:allValuesFrom)

2021-12-05 Thread Steve Vestal
Which reasoner are you using?  Have you tried openllet (Pellet for Jena) to see if you get the desired result? Out of curiosity, what notation (ontology syntax) are you using here? On 12/5/2021 8:38 AM, Jakub Jałowiec wrote: Hi, I have an OWL ontology

Re: Error initializing geosparql

2021-12-05 Thread Jean-Marc Vanel
I fixed the WKT not having the right datatype, as said before; here are the SPARQL used to check and fix: COUNT-spatial-wkt-as-string.rq FIX-spatial-wkt-as-string.upd.rq

OWL inferences in Apache Jena (for e.g. owl:allValuesFrom)

2021-12-05 Thread Jakub Jałowiec
Hi, I have an OWL ontology https://github.com/kubajal/covidepid/blob/main/minimal_test.ttl. The ontology has the following definitions: > >- Person > - CatPerson (subClassOf Person + CatPerson equivalentTo hasPet only > Cat) >- Animal > - Cat (subClassOf Animal) >-

Re: Apache Jena rules to find the minimum in a list of data property values

2021-12-05 Thread Martynas Jusevičius
You could use the CONSTRUCT query form as rules and augment your model with the constructed triples. Something like this (untested): PREFIX covidepid: <> PREFIX foaf: CONSTRUCT { ?person a covidepid:YoungestPerson . } WHERE { SELECT ?house ?person

Re: Apache Jena rules to find the minimum in a list of data property values

2021-12-05 Thread Jakub Jałowiec
Thanks, that solves the problem and I'll stick to it for now. Nonetheless, is it possible to automatically infer being an instance of the hypothetical class "YoungestPerson" ("the person with the lowest foaf:age aggregate by house") in Apache Jena as described above? Ideally, I would prefer to

Re: Error initializing geosparql

2021-12-05 Thread Jean-Marc Vanel
After looking at this code, failing line in bold: jena-geosparql/src/main/java/org/apache/jena/geosparql/configuration/ModeSRS.java https://github.com/apache/jena/blob/main/jena-geosparql/src/main/java/org/apache/jena/geosparql/configuration/ModeSRS.java ExtendedIterator nodeIter =

Re: Error initializing geosparql

2021-12-05 Thread Andy Seaborne
On 05/12/2021 10:52, Jean-Marc Vanel wrote: After having fixed bad data in the TDB database (latitude is present but not longitude, coordinates as strings , see issue https://issues.apache.org/jira/browse/JENA-2202 ), there is an exception, probably related to the database content. Here is

Error initializing geosparql

2021-12-05 Thread Jean-Marc Vanel
After having fixed bad data in the TDB database (latitude is present but not longitude, coordinates as strings , see issue https://issues.apache.org/jira/browse/JENA-2202 ), there is an exception, probably related to the database content. Here is the log: Dec 05, 2021 9:57:33 AM

Re: Apache Jena rules to find the minimum in a list of data property values

2021-12-05 Thread Lorenz Buehmann
Hi, the common pattern in SPARQL is to get the aggregated value in an inner query first, then in the outer query get the entity with the aggregated value: SELECT ?house ?person ?lowestAge { ?person foaf:age ?lowestAge . ?person covidepid:livesIn ?house . {SELECT ?house (min(?age) as