You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Manuel Enrique Puebla Martinez <mp...@uci.cu> on 2018/12/05 16:15:33 UTC
Is it possible to infer new knowledge about an ontology only from a
query in SPARQL?
Hello:
Is it possible to infer new knowledge about an ontology only from a query in SPARQL?
I have a question about the use of the SPARQL language about ontologies. So far I have thought that SPARQL is the equivalent to the SQL language in the relational databases, that is to say, that with SPARQL it is only possible to consult the data that are explicitly in the ontology, without having access to the data that can be inferred , leaving the responsibility of the inference to the reasoners.
However, I have read documents from which I infer that SPARQL does have the capacity to infer implicit and non-explicit knowledge in the ontology. Is my inference true? That is, is it possible to infer knowledge through a SPARQL query without the need for a reasoner? If the answer is true, then what advantages does the use of a reasoner have over the use of SPARQL?
Greetings, Manuel Puebla.
Re: Is it possible to infer new knowledge about an ontology only from
a query in SPARQL?
Posted by Andy Seaborne <an...@apache.org>.
Hi there,
There are two ways (maybe more!)
1/ Query with SPARQL the inference model.
The Jena reasoners all provide an "inf model" which is the base data and
all the inferred triples.
Not all inference can be done this way (some cases of OWL-DL with
disjunction can't be turned into triples) but Jena reasoners don't
support that level of inference.
2/ Some things can be done in SPARQL:
SELECT * {
?x rdf:type/rdfs:subClassOf* ?Type
}
is all ?x and its types, including up the subClass hierarchy.
SELECT * { ?x ?p ?v . ?p rdfs:subPropertyOf* :property }
is subPropertyOf (and quite inefficient!)
Pre-computing the transitive rdfs:subClassOf* improves performance.
It is hard to write queries that cover multiple inference rules - e.g.
using mixed domain/range and also subClassOf - because they mutually
depend on each other.
3/ And you can create data with assignments:
SELECT ?s ?w { ?s :p ?v . BIND( ?v +1 AS ?w) }
That's more like a simple business rule than ontology.
Andy
On 05/12/2018 16:15, Manuel Enrique Puebla Martinez wrote:
>
> Hello:
>
> Is it possible to infer new knowledge about an ontology only from a query in SPARQL?
>
> I have a question about the use of the SPARQL language about ontologies. So far I have thought that SPARQL is the equivalent to the SQL language in the relational databases, that is to say, that with SPARQL it is only possible to consult the data that are explicitly in the ontology, without having access to the data that can be inferred , leaving the responsibility of the inference to the reasoners.
>
> However, I have read documents from which I infer that SPARQL does have the capacity to infer implicit and non-explicit knowledge in the ontology. Is my inference true? That is, is it possible to infer knowledge through a SPARQL query without the need for a reasoner? If the answer is true, then what advantages does the use of a reasoner have over the use of SPARQL?
>
>
>
> Greetings, Manuel Puebla.
>
Re: Is it possible to infer new knowledge about an ontology only from
a query in SPARQL?
Posted by Dan Davis <da...@gmail.com>.
Hi, the ability for RDF frameworks like Jena and triple-stores to do
inference is one of the particular features of RDF and SPARQL over graph
databases like Neo4j.
The inference done by triple stores is first-order logic, rather than
statistical inference, but it is still powerful. It means that you can
discovery surprising things about your data simply using your ontology
(which describes how classes relate to each other).
On Wed, Dec 5, 2018 at 11:16 AM Manuel Enrique Puebla Martinez <
mpuebla@uci.cu> wrote:
>
> Hello:
>
> Is it possible to infer new knowledge about an ontology only from a query
> in SPARQL?
>
> I have a question about the use of the SPARQL language about ontologies.
> So far I have thought that SPARQL is the equivalent to the SQL language in
> the relational databases, that is to say, that with SPARQL it is only
> possible to consult the data that are explicitly in the ontology, without
> having access to the data that can be inferred , leaving the responsibility
> of the inference to the reasoners.
>
> However, I have read documents from which I infer that SPARQL does have
> the capacity to infer implicit and non-explicit knowledge in the ontology.
> Is my inference true? That is, is it possible to infer knowledge through a
> SPARQL query without the need for a reasoner? If the answer is true, then
> what advantages does the use of a reasoner have over the use of SPARQL?
>
>
>
> Greetings, Manuel Puebla.
>
>