You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Andrew U. Frank" <fr...@geoinfo.tuwien.ac.at> on 2017/12/12 14:55:07 UTC
OWL reasoner not making deduction for class with value restriction
I have asked on stackoverflow, perhaps somebody here knows the answer
I try to add a bit of ontology to a (public) RDF dataset (wordnet),
specifically I need to differentiate between |LexicalEntries| for Verbs
and Nouns, separated as two subclasses. Following examples on the web
and in the OWL standard, I assumed that
|:LexicalEntryNoun a owl:Class ; rdfs:subClassOf [ a owl:Restriction ;
owl:onProperty wn:part_of_speech ; owl:hasValue wn:noun ] . |
should build a class |LexicalEntryNoun|, but the query (in jena fuseki)
|prefix : <http://gerastree.at/2017/litonto#> SELECT * WHERE { ?s a
:LexicalEntryNoun. } |
gives an empty result. The two URI which should be returned are included
in the class represented by a blank node, which stands for the
restriction, but are not reported as |LexicalEntryNoun| as reported in
other queries.
i am new to OWL and do not find many examples of OWL in turtle syntax.
Where is my error? Thank you for help!
I constructed a very small subset of data which is loaded together with
the OWL reasoner |http://jena.hpl.hp.com/2003/OWLFBRuleReasoner|:
|@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> . @prefix lemon:
<http://lemon-model.net/lemon#> . @prefix nlp:
<http://gerastree.at/nlp_2015#> . @prefix rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix lit:
<http://gerastree.at/lit_2014#> . @prefix wn:
<http://wordnet-rdf.princeton.edu/ontology#> . @prefix rdfs:
<http://www.w3.org/2000/01/rdf-schema#> . @prefix ns:
<http://www.example.org/ns#> . @prefix owl:
<http://www.w3.org/2002/07/owl#> . @prefix xsd:
<http://www.w3.org/2001/XMLSchema#> . @prefix :
<http://gerastree.at/2017/litonto#> .
<http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> a _:b0 ,
owl:Thing , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
<http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalForm>
; lemon:sense
<http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> ,
<http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
wn:part_of_speech wn:noun ; owl:sameAs
<http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
<http://wordnet-rdf.princeton.edu/wn31/%27hood-n> a _:b0 , owl:Thing ,
rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
<http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
lemon:sense <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00>
, <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
wn:part_of_speech wn:noun ; owl:sameAs
<http://wordnet-rdf.princeton.edu/wn31/%27hood-n> . :LexicalEntryNoun a
owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty
wn:part_of_speech ; owl:hasValue wn:noun ] . |
--
em.o.Univ.Prof. Dr. sc.techn. Dr. h.c. Andrew U. Frank
+43 1 58801 12710 direct
Geoinformation, TU Wien +43 1 58801 12700 office
Gusshausstr. 27-29 +43 1 55801 12799 fax
1040 Wien Austria +43 676 419 25 72 mobil
Re: OWL reasoner not making deduction for class with value
restriction
Posted by "Andrew U. Frank" <fr...@geoinfo.tuwien.ac.at>.
thank you barry! your explanation did the trick. (1) it works and (2) i
understand it (perhaps more important).
:LexicalEntryNoun a owl:Class ;
owl:equivalentClass # not: rdfs:subClassOf
[ a owl:Restriction ;
owl:onProperty wn:part_of_speech ;
owl:hasValue wn:noun
] .
i think that some explanation which i found on the web and copied dealt
with the issue that there were more things which satisfied the
restriction and thus the newly defined class was a subset of these (and
somewhere else in the example, the new class was defined, which i did
not notice).
thank you all to clarify the point!
to barry: do you want the honor to add the solution to stackoverflow? i
will then confirm it.
andrew
On 12/12/2017 01:12 PM, Nouwt, B. (Barry) wrote:
> Hi Lorenz and Dave,
>
> Thanks for the explanation! I did not realize the difference between equivalence and subclassof in this context.
>
> Maybe this is also the solution to this question? Change the subclassof to an equivalence? Since both resources:
>
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n>
>
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n>
>
> would fall inside the :LexicalEntryNoun class and show up in his SPARQL query. Or am I missing something again?
>
> Regards, Barry
>
> -----Original Message-----
> From: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de]
> Sent: dinsdag 12 december 2017 19:01
> To: users@jena.apache.org
> Subject: Re: OWL reasoner not making deduction for class with value restriction
>
> Hi Barry,
>
>
> On 12.12.2017 18:43, Nouwt, B. (Barry) wrote:
>> Hi Lorenz,
>>
>> You say:
>>
>> "if some individual :x belongs to class :LexicalEntryNoun, then a
>> triple
>>
>> :x wn:part_of_speech wn:noun .
>>
>> can be inferred."
>>
>> , but isn't it also the other way around?
>>
>> "if some individual :x has the property wn:part_of_speech wn:noun,
>> then a triple
>>
>> :x rdfs:type LexicalEntryNoun
>>
>> can be inferred."
> No, why do you think so? It's a SubClassOf axiom and the class LexicalEntryNoun is on the left-hand side (in Manchester OWL syntax to make it more readable):
>
> Class: LexicalEntryNoun
> SubClassOf: wn:part_of_speech value wn:noun
>
> OWL is based on Description Logics, the semantics is defined on set theory:
>
> :A rdfs:subClassOf :B
>
> implies the set of individuals in :A is a subset of the set of individuals in :B.
>
> Or just see it as logical implication, "if A then B"
>
> Having also the other direction of inference would need an EquivalentClass axiom, i.e. one has to use owl:equivalentClass instead of rdfs:subClassOf:
>
> :LexicalEntryNoun a owl:Class ;
> owl:equivalentClass [ a owl:Restriction ;
>
> owl:onProperty wn:part_of_speech ;
>
> owl:hasValue wn:noun ] .
>
> This means both class expressions contain exactly the same set of individuals. Indeed, as you probably already recognized, this is just "syntactic sugar" for two rdfs:subClassOf axioms for both directions.
>
> Hope this answer helps, if not, feel free to ask.
>
> Cheers,
> Lorenz
>
>> Regards, Barry
>>
>>
>>
>> -----Original Message-----
>> From: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de]
>> Sent: dinsdag 12 december 2017 16:15
>> To: users@jena.apache.org
>> Subject: Re: OWL reasoner not making deduction for class with value
>> restriction
>>
>> Good evening!
>>
>>
>> I commented already on StackOverflow, but to make it consistent with the mailing list here, please read the comments inline:
>>
>>
>> On 12.12.2017 15:55, Andrew U. Frank wrote:
>>> I have asked on stackoverflow, perhaps somebody here knows the answer
>>>
>>>
>>>
>>> I try to add a bit of ontology to a (public) RDF dataset (wordnet),
>>> specifically I need to differentiate between |LexicalEntries| for
>>> Verbs and Nouns, separated as two subclasses. Following examples on
>>> the web and in the OWL standard, I assumed that
>>>
>>> |:LexicalEntryNoun a owl:Class ; rdfs:subClassOf [ a owl:Restriction
>>> |;
>>> owl:onProperty wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>>
>>> should build a class |LexicalEntryNoun|, but the query (in jena
>>> fuseki)
>> What means "build a class"? This axiom states that
>>
>> if some individual :x belongs to class :LexicalEntryNoun, then a
>> triple
>>
>> :x wn:part_of_speech wn:noun .
>>
>> can be inferred.
>>
>>> |prefix : <http://gerastree.at/2017/litonto#> SELECT * WHERE { ?s a
>>> :LexicalEntryNoun. } |
>>>
>>> gives an empty result. The two URI which should be returned are
>>> included in the class represented by a blank node, which stands for
>>> the restriction, but are not reported as |LexicalEntryNoun| as
>>> reported in other queries.
>> Your query is just looking for subjects of RDF triples that belong to
>> class :LexicalEntryNoun, i.e. that match the pattern
>>
>> ?s rdf:type :LexicalEntryNoun .
>>
>> Neither your data nor the axiom above is "generating" such an individual, at least not by OWL inference.
>>
>> Does this answer your question?
>>
>>
>> Lorenz
>>
>>> i am new to OWL and do not find many examples of OWL in turtle syntax.
>>> Where is my error? Thank you for help!
>>>
>>> I constructed a very small subset of data which is loaded together
>>> with the OWL reasoner |http://jena.hpl.hp.com/2003/OWLFBRuleReasoner|:
>>>
>>> |@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> . @prefix
>>> lemon: <http://lemon-model.net/lemon#> . @prefix nlp:
>>> <http://gerastree.at/nlp_2015#> . @prefix rdf:
>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix lit:
>>> <http://gerastree.at/lit_2014#> . @prefix wn:
>>> <http://wordnet-rdf.princeton.edu/ontology#> . @prefix rdfs:
>>> <http://www.w3.org/2000/01/rdf-schema#> . @prefix ns:
>>> <http://www.example.org/ns#> . @prefix owl:
>>> <http://www.w3.org/2002/07/owl#> . @prefix xsd:
>>> <http://www.w3.org/2001/XMLSchema#> . @prefix :
>>> <http://gerastree.at/2017/litonto#> .
>>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> a _:b0 ,
>>> owl:Thing , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalFor
>>> m
>>> ; lemon:sense
>>> <http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> ,
>>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
>>> wn:part_of_speech wn:noun ; owl:sameAs
>>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
>>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> a _:b0 , owl:Thing
>>> , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
>>> lemon:sense
>>> <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00> ,
>>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
>>> wn:part_of_speech wn:noun ; owl:sameAs
>>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> . :LexicalEntryNoun
>>> a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty
>>> wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>>
>> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
>>
--
em.o.Univ.Prof. Dr. sc.techn. Dr. h.c. Andrew U. Frank
+43 1 58801 12710 direct
Geoinformation, TU Wien +43 1 58801 12700 office
Gusshausstr. 27-29 +43 1 55801 12799 fax
1040 Wien Austria +43 676 419 25 72 mobil
RE: OWL reasoner not making deduction for class with value
restriction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl>.
Hi Lorenz and Dave,
Thanks for the explanation! I did not realize the difference between equivalence and subclassof in this context.
Maybe this is also the solution to this question? Change the subclassof to an equivalence? Since both resources:
<http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n>
<http://wordnet-rdf.princeton.edu/wn31/%27hood-n>
would fall inside the :LexicalEntryNoun class and show up in his SPARQL query. Or am I missing something again?
Regards, Barry
-----Original Message-----
From: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de]
Sent: dinsdag 12 december 2017 19:01
To: users@jena.apache.org
Subject: Re: OWL reasoner not making deduction for class with value restriction
Hi Barry,
On 12.12.2017 18:43, Nouwt, B. (Barry) wrote:
> Hi Lorenz,
>
> You say:
>
> "if some individual :x belongs to class :LexicalEntryNoun, then a
> triple
>
> :x wn:part_of_speech wn:noun .
>
> can be inferred."
>
> , but isn't it also the other way around?
>
> "if some individual :x has the property wn:part_of_speech wn:noun,
> then a triple
>
> :x rdfs:type LexicalEntryNoun
>
> can be inferred."
No, why do you think so? It's a SubClassOf axiom and the class LexicalEntryNoun is on the left-hand side (in Manchester OWL syntax to make it more readable):
Class: LexicalEntryNoun
SubClassOf: wn:part_of_speech value wn:noun
OWL is based on Description Logics, the semantics is defined on set theory:
:A rdfs:subClassOf :B
implies the set of individuals in :A is a subset of the set of individuals in :B.
Or just see it as logical implication, "if A then B"
Having also the other direction of inference would need an EquivalentClass axiom, i.e. one has to use owl:equivalentClass instead of rdfs:subClassOf:
:LexicalEntryNoun a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:onProperty wn:part_of_speech ;
owl:hasValue wn:noun ] .
This means both class expressions contain exactly the same set of individuals. Indeed, as you probably already recognized, this is just "syntactic sugar" for two rdfs:subClassOf axioms for both directions.
Hope this answer helps, if not, feel free to ask.
Cheers,
Lorenz
>
> Regards, Barry
>
>
>
> -----Original Message-----
> From: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de]
> Sent: dinsdag 12 december 2017 16:15
> To: users@jena.apache.org
> Subject: Re: OWL reasoner not making deduction for class with value
> restriction
>
> Good evening!
>
>
> I commented already on StackOverflow, but to make it consistent with the mailing list here, please read the comments inline:
>
>
> On 12.12.2017 15:55, Andrew U. Frank wrote:
>> I have asked on stackoverflow, perhaps somebody here knows the answer
>>
>>
>>
>> I try to add a bit of ontology to a (public) RDF dataset (wordnet),
>> specifically I need to differentiate between |LexicalEntries| for
>> Verbs and Nouns, separated as two subclasses. Following examples on
>> the web and in the OWL standard, I assumed that
>>
>> |:LexicalEntryNoun a owl:Class ; rdfs:subClassOf [ a owl:Restriction
>> |;
>> owl:onProperty wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>
>> should build a class |LexicalEntryNoun|, but the query (in jena
>> fuseki)
> What means "build a class"? This axiom states that
>
> if some individual :x belongs to class :LexicalEntryNoun, then a
> triple
>
> :x wn:part_of_speech wn:noun .
>
> can be inferred.
>
>> |prefix : <http://gerastree.at/2017/litonto#> SELECT * WHERE { ?s a
>> :LexicalEntryNoun. } |
>>
>> gives an empty result. The two URI which should be returned are
>> included in the class represented by a blank node, which stands for
>> the restriction, but are not reported as |LexicalEntryNoun| as
>> reported in other queries.
> Your query is just looking for subjects of RDF triples that belong to
> class :LexicalEntryNoun, i.e. that match the pattern
>
> ?s rdf:type :LexicalEntryNoun .
>
> Neither your data nor the axiom above is "generating" such an individual, at least not by OWL inference.
>
> Does this answer your question?
>
>
> Lorenz
>
>> i am new to OWL and do not find many examples of OWL in turtle syntax.
>> Where is my error? Thank you for help!
>>
>> I constructed a very small subset of data which is loaded together
>> with the OWL reasoner |http://jena.hpl.hp.com/2003/OWLFBRuleReasoner|:
>>
>> |@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> . @prefix
>> lemon: <http://lemon-model.net/lemon#> . @prefix nlp:
>> <http://gerastree.at/nlp_2015#> . @prefix rdf:
>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix lit:
>> <http://gerastree.at/lit_2014#> . @prefix wn:
>> <http://wordnet-rdf.princeton.edu/ontology#> . @prefix rdfs:
>> <http://www.w3.org/2000/01/rdf-schema#> . @prefix ns:
>> <http://www.example.org/ns#> . @prefix owl:
>> <http://www.w3.org/2002/07/owl#> . @prefix xsd:
>> <http://www.w3.org/2001/XMLSchema#> . @prefix :
>> <http://gerastree.at/2017/litonto#> .
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> a _:b0 ,
>> owl:Thing , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalFor
>> m
>> ; lemon:sense
>> <http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> ,
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
>> wn:part_of_speech wn:noun ; owl:sameAs
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> a _:b0 , owl:Thing
>> , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
>> lemon:sense
>> <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00> ,
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
>> wn:part_of_speech wn:noun ; owl:sameAs
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> . :LexicalEntryNoun
>> a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty
>> wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>
> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
>
Re: OWL reasoner not making deduction for class with value
restriction
Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
Hi Barry,
On 12.12.2017 18:43, Nouwt, B. (Barry) wrote:
> Hi Lorenz,
>
> You say:
>
> "if some individual :x belongs to class :LexicalEntryNoun, then a triple
>
> :x wn:part_of_speech wn:noun .
>
> can be inferred."
>
> , but isn't it also the other way around?
>
> "if some individual :x has the property wn:part_of_speech wn:noun, then a triple
>
> :x rdfs:type LexicalEntryNoun
>
> can be inferred."
No, why do you think so? It's a SubClassOf axiom and the class
LexicalEntryNoun is on the left-hand side (in Manchester OWL syntax to
make it more readable):
Class: LexicalEntryNoun
SubClassOf: wn:part_of_speech value wn:noun
OWL is based on Description Logics, the semantics is defined on set theory:
:A rdfs:subClassOf :B
implies the set of individuals in :A is a subset of the set of
individuals in :B.
Or just see it as logical implication, "if A then B"
Having also the other direction of inference would need an
EquivalentClass axiom, i.e. one has to use owl:equivalentClass instead
of rdfs:subClassOf:
:LexicalEntryNoun a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:onProperty wn:part_of_speech ;
owl:hasValue wn:noun ] .
This means both class expressions contain exactly the same set of
individuals. Indeed, as you probably already recognized, this is just
"syntactic sugar" for two rdfs:subClassOf axioms for both directions.
Hope this answer helps, if not, feel free to ask.
Cheers,
Lorenz
>
> Regards, Barry
>
>
>
> -----Original Message-----
> From: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de]
> Sent: dinsdag 12 december 2017 16:15
> To: users@jena.apache.org
> Subject: Re: OWL reasoner not making deduction for class with value restriction
>
> Good evening!
>
>
> I commented already on StackOverflow, but to make it consistent with the mailing list here, please read the comments inline:
>
>
> On 12.12.2017 15:55, Andrew U. Frank wrote:
>> I have asked on stackoverflow, perhaps somebody here knows the answer
>>
>>
>>
>> I try to add a bit of ontology to a (public) RDF dataset (wordnet),
>> specifically I need to differentiate between |LexicalEntries| for
>> Verbs and Nouns, separated as two subclasses. Following examples on
>> the web and in the OWL standard, I assumed that
>>
>> |:LexicalEntryNoun a owl:Class ; rdfs:subClassOf [ a owl:Restriction ;
>> owl:onProperty wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>
>> should build a class |LexicalEntryNoun|, but the query (in jena
>> fuseki)
> What means "build a class"? This axiom states that
>
> if some individual :x belongs to class :LexicalEntryNoun, then a triple
>
> :x wn:part_of_speech wn:noun .
>
> can be inferred.
>
>> |prefix : <http://gerastree.at/2017/litonto#> SELECT * WHERE { ?s a
>> :LexicalEntryNoun. } |
>>
>> gives an empty result. The two URI which should be returned are
>> included in the class represented by a blank node, which stands for
>> the restriction, but are not reported as |LexicalEntryNoun| as
>> reported in other queries.
> Your query is just looking for subjects of RDF triples that belong to class :LexicalEntryNoun, i.e. that match the pattern
>
> ?s rdf:type :LexicalEntryNoun .
>
> Neither your data nor the axiom above is "generating" such an individual, at least not by OWL inference.
>
> Does this answer your question?
>
>
> Lorenz
>
>> i am new to OWL and do not find many examples of OWL in turtle syntax.
>> Where is my error? Thank you for help!
>>
>> I constructed a very small subset of data which is loaded together
>> with the OWL reasoner |http://jena.hpl.hp.com/2003/OWLFBRuleReasoner|:
>>
>> |@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> . @prefix
>> lemon: <http://lemon-model.net/lemon#> . @prefix nlp:
>> <http://gerastree.at/nlp_2015#> . @prefix rdf:
>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix lit:
>> <http://gerastree.at/lit_2014#> . @prefix wn:
>> <http://wordnet-rdf.princeton.edu/ontology#> . @prefix rdfs:
>> <http://www.w3.org/2000/01/rdf-schema#> . @prefix ns:
>> <http://www.example.org/ns#> . @prefix owl:
>> <http://www.w3.org/2002/07/owl#> . @prefix xsd:
>> <http://www.w3.org/2001/XMLSchema#> . @prefix :
>> <http://gerastree.at/2017/litonto#> .
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> a _:b0 ,
>> owl:Thing , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalForm
>> ; lemon:sense
>> <http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> ,
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
>> wn:part_of_speech wn:noun ; owl:sameAs
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> a _:b0 , owl:Thing ,
>> rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
>> lemon:sense
>> <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00> ,
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
>> wn:part_of_speech wn:noun ; owl:sameAs
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> . :LexicalEntryNoun
>> a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty
>> wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>
> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
>
Re: OWL reasoner not making deduction for class with value
restriction
Posted by Dave Reynolds <da...@gmail.com>.
On 12/12/17 17:43, Nouwt, B. (Barry) wrote:
> Hi Lorenz,
>
> You say:
>
> "if some individual :x belongs to class :LexicalEntryNoun, then a triple
>
> :x wn:part_of_speech wn:noun .
>
> can be inferred."
>
> , but isn't it also the other way around?
>
> "if some individual :x has the property wn:part_of_speech wn:noun, then a triple
>
> :x rdfs:type LexicalEntryNoun
>
> can be inferred."
Only if the subClassOf were the other way round.
Dave
>
> Regards, Barry
>
>
>
> -----Original Message-----
> From: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de]
> Sent: dinsdag 12 december 2017 16:15
> To: users@jena.apache.org
> Subject: Re: OWL reasoner not making deduction for class with value restriction
>
> Good evening!
>
>
> I commented already on StackOverflow, but to make it consistent with the mailing list here, please read the comments inline:
>
>
> On 12.12.2017 15:55, Andrew U. Frank wrote:
>> I have asked on stackoverflow, perhaps somebody here knows the answer
>>
>>
>>
>> I try to add a bit of ontology to a (public) RDF dataset (wordnet),
>> specifically I need to differentiate between |LexicalEntries| for
>> Verbs and Nouns, separated as two subclasses. Following examples on
>> the web and in the OWL standard, I assumed that
>>
>> |:LexicalEntryNoun a owl:Class ; rdfs:subClassOf [ a owl:Restriction ;
>> owl:onProperty wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>
>> should build a class |LexicalEntryNoun|, but the query (in jena
>> fuseki)
> What means "build a class"? This axiom states that
>
> if some individual :x belongs to class :LexicalEntryNoun, then a triple
>
> :x wn:part_of_speech wn:noun .
>
> can be inferred.
>
>>
>> |prefix : <http://gerastree.at/2017/litonto#> SELECT * WHERE { ?s a
>> :LexicalEntryNoun. } |
>>
>> gives an empty result. The two URI which should be returned are
>> included in the class represented by a blank node, which stands for
>> the restriction, but are not reported as |LexicalEntryNoun| as
>> reported in other queries.
> Your query is just looking for subjects of RDF triples that belong to class :LexicalEntryNoun, i.e. that match the pattern
>
> ?s rdf:type :LexicalEntryNoun .
>
> Neither your data nor the axiom above is "generating" such an individual, at least not by OWL inference.
>
> Does this answer your question?
>
>
> Lorenz
>
>>
>> i am new to OWL and do not find many examples of OWL in turtle syntax.
>> Where is my error? Thank you for help!
>>
>> I constructed a very small subset of data which is loaded together
>> with the OWL reasoner |http://jena.hpl.hp.com/2003/OWLFBRuleReasoner|:
>>
>> |@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> . @prefix
>> lemon: <http://lemon-model.net/lemon#> . @prefix nlp:
>> <http://gerastree.at/nlp_2015#> . @prefix rdf:
>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix lit:
>> <http://gerastree.at/lit_2014#> . @prefix wn:
>> <http://wordnet-rdf.princeton.edu/ontology#> . @prefix rdfs:
>> <http://www.w3.org/2000/01/rdf-schema#> . @prefix ns:
>> <http://www.example.org/ns#> . @prefix owl:
>> <http://www.w3.org/2002/07/owl#> . @prefix xsd:
>> <http://www.w3.org/2001/XMLSchema#> . @prefix :
>> <http://gerastree.at/2017/litonto#> .
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> a _:b0 ,
>> owl:Thing , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalForm
>>>
>> ; lemon:sense
>> <http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> ,
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
>> wn:part_of_speech wn:noun ; owl:sameAs
>> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> a _:b0 , owl:Thing ,
>> rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
>> lemon:sense
>> <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00> ,
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
>> wn:part_of_speech wn:noun ; owl:sameAs
>> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> . :LexicalEntryNoun
>> a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty
>> wn:part_of_speech ; owl:hasValue wn:noun ] . |
>>
>
> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
>
RE: OWL reasoner not making deduction for class with value
restriction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl>.
Hi Lorenz,
You say:
"if some individual :x belongs to class :LexicalEntryNoun, then a triple
:x wn:part_of_speech wn:noun .
can be inferred."
, but isn't it also the other way around?
"if some individual :x has the property wn:part_of_speech wn:noun, then a triple
:x rdfs:type LexicalEntryNoun
can be inferred."
Regards, Barry
-----Original Message-----
From: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de]
Sent: dinsdag 12 december 2017 16:15
To: users@jena.apache.org
Subject: Re: OWL reasoner not making deduction for class with value restriction
Good evening!
I commented already on StackOverflow, but to make it consistent with the mailing list here, please read the comments inline:
On 12.12.2017 15:55, Andrew U. Frank wrote:
> I have asked on stackoverflow, perhaps somebody here knows the answer
>
>
>
> I try to add a bit of ontology to a (public) RDF dataset (wordnet),
> specifically I need to differentiate between |LexicalEntries| for
> Verbs and Nouns, separated as two subclasses. Following examples on
> the web and in the OWL standard, I assumed that
>
> |:LexicalEntryNoun a owl:Class ; rdfs:subClassOf [ a owl:Restriction ;
> owl:onProperty wn:part_of_speech ; owl:hasValue wn:noun ] . |
>
> should build a class |LexicalEntryNoun|, but the query (in jena
> fuseki)
What means "build a class"? This axiom states that
if some individual :x belongs to class :LexicalEntryNoun, then a triple
:x wn:part_of_speech wn:noun .
can be inferred.
>
> |prefix : <http://gerastree.at/2017/litonto#> SELECT * WHERE { ?s a
> :LexicalEntryNoun. } |
>
> gives an empty result. The two URI which should be returned are
> included in the class represented by a blank node, which stands for
> the restriction, but are not reported as |LexicalEntryNoun| as
> reported in other queries.
Your query is just looking for subjects of RDF triples that belong to class :LexicalEntryNoun, i.e. that match the pattern
?s rdf:type :LexicalEntryNoun .
Neither your data nor the axiom above is "generating" such an individual, at least not by OWL inference.
Does this answer your question?
Lorenz
>
> i am new to OWL and do not find many examples of OWL in turtle syntax.
> Where is my error? Thank you for help!
>
> I constructed a very small subset of data which is loaded together
> with the OWL reasoner |http://jena.hpl.hp.com/2003/OWLFBRuleReasoner|:
>
> |@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> . @prefix
> lemon: <http://lemon-model.net/lemon#> . @prefix nlp:
> <http://gerastree.at/nlp_2015#> . @prefix rdf:
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix lit:
> <http://gerastree.at/lit_2014#> . @prefix wn:
> <http://wordnet-rdf.princeton.edu/ontology#> . @prefix rdfs:
> <http://www.w3.org/2000/01/rdf-schema#> . @prefix ns:
> <http://www.example.org/ns#> . @prefix owl:
> <http://www.w3.org/2002/07/owl#> . @prefix xsd:
> <http://www.w3.org/2001/XMLSchema#> . @prefix :
> <http://gerastree.at/2017/litonto#> .
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> a _:b0 ,
> owl:Thing , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalForm
> >
> ; lemon:sense
> <http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> ,
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
> wn:part_of_speech wn:noun ; owl:sameAs
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> a _:b0 , owl:Thing ,
> rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
> lemon:sense
> <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00> ,
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
> wn:part_of_speech wn:noun ; owl:sameAs
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> . :LexicalEntryNoun
> a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty
> wn:part_of_speech ; owl:hasValue wn:noun ] . |
>
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
Re: OWL reasoner not making deduction for class with value
restriction
Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
Good evening!
I commented already on StackOverflow, but to make it consistent with the
mailing list here, please read the comments inline:
On 12.12.2017 15:55, Andrew U. Frank wrote:
> I have asked on stackoverflow, perhaps somebody here knows the answer
>
>
>
> I try to add a bit of ontology to a (public) RDF dataset (wordnet),
> specifically I need to differentiate between |LexicalEntries| for
> Verbs and Nouns, separated as two subclasses. Following examples on
> the web and in the OWL standard, I assumed that
>
> |:LexicalEntryNoun a owl:Class ; rdfs:subClassOf [ a owl:Restriction ;
> owl:onProperty wn:part_of_speech ; owl:hasValue wn:noun ] . |
>
> should build a class |LexicalEntryNoun|, but the query (in jena fuseki)
What means "build a class"? This axiom states that
if some individual :x belongs to class :LexicalEntryNoun, then a triple
:x wn:part_of_speech wn:noun .
can be inferred.
>
> |prefix : <http://gerastree.at/2017/litonto#> SELECT * WHERE { ?s a
> :LexicalEntryNoun. } |
>
> gives an empty result. The two URI which should be returned are
> included in the class represented by a blank node, which stands for
> the restriction, but are not reported as |LexicalEntryNoun| as
> reported in other queries.
Your query is just looking for subjects of RDF triples that belong to
class :LexicalEntryNoun, i.e. that match the pattern
?s rdf:type :LexicalEntryNoun .
Neither your data nor the axiom above is "generating" such an
individual, at least not by OWL inference.
Does this answer your question?
Lorenz
>
> i am new to OWL and do not find many examples of OWL in turtle syntax.
> Where is my error? Thank you for help!
>
> I constructed a very small subset of data which is loaded together
> with the OWL reasoner |http://jena.hpl.hp.com/2003/OWLFBRuleReasoner|:
>
> |@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> . @prefix
> lemon: <http://lemon-model.net/lemon#> . @prefix nlp:
> <http://gerastree.at/nlp_2015#> . @prefix rdf:
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix lit:
> <http://gerastree.at/lit_2014#> . @prefix wn:
> <http://wordnet-rdf.princeton.edu/ontology#> . @prefix rdfs:
> <http://www.w3.org/2000/01/rdf-schema#> . @prefix ns:
> <http://www.example.org/ns#> . @prefix owl:
> <http://www.w3.org/2002/07/owl#> . @prefix xsd:
> <http://www.w3.org/2001/XMLSchema#> . @prefix :
> <http://gerastree.at/2017/litonto#> .
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> a _:b0 ,
> owl:Thing , rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalForm>
> ; lemon:sense
> <http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> ,
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
> wn:part_of_speech wn:noun ; owl:sameAs
> <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> a _:b0 , owl:Thing ,
> rdfs:Resource , lemon:LexicalEntry ; lemon:canonicalForm
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
> lemon:sense
> <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00> ,
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
> wn:part_of_speech wn:noun ; owl:sameAs
> <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> . :LexicalEntryNoun
> a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty
> wn:part_of_speech ; owl:hasValue wn:noun ] . |
>