[英]How to express 2 events are related if they have at least one common participant in OWL or RDFS
[英]OWL. How to express that siblings has common parent?
我用海龜符號寫了一個簡單的文件,其中戴夫是瑪麗的父親和傑克的瑪麗妹妹。 我想要戴夫有兩個孩子傑克和瑪麗的理由。
:Human a rdfs:Class .
:Man rdfs:subClassOf :Human ;
owl:disjointWith :Woman .
:Woman rdfs:subClassOf :Human ;
owl:disjointWith :Man .
:hasChild a rdf:Property ;
owl:inverseOf :hasParent ;
rdfs:domain :Human ;
rdfs:range :Human.
:fatherOf owl:InverseFunctionalProperty rdf:Property ;
owl:inverseOf :hasFather ;
rdfs:subPropertyOf :hasChild ;
rdfs:domain :Man ;
rdfs:range :Human.
:motherOf owl:InverseFunctionalProperty rdf:Property ;
owl:inverseOf :hasMother ;
rdfs:subPropertyOf :hasChild ;
rdfs:domain :Woman ;
rdfs:range :Human.
:siblingOf a owl:SymmetricProperty, owl:TransitiveProperty ;
owl:inverseOf :hasSibling ;
rdfs:domain :Human ;
rdfs:range :Human.
:brotherOf a rdf:Property ;
owl:inverseOf :hasBrother ;
rdfs:subPropertyOf :siblingOf ;
rdfs:domain :Man ;
rdfs:range :Human.
:sisterOf a rdf:Property ;
owl:inverseOf :hasSister ;
rdfs:subPropertyOf :siblingOf ;
rdfs:domain :Woman ;
rdfs:range :Human.
[] rdf:type owl:Axiom ;
owl:subject :Man ;
owl:predicate rdfs:subClassOf ;
owl:object :Human ;
rdfs:label "States that every man is a human."^^xsd:string .
[] rdf:type owl:Axiom ;
owl:subject :Woman ;
owl:predicate rdfs:subClassOf ;
owl:object :Human ;
rdfs:label "States that every woman is a human."^^xsd:string .
:Dave a :Man .
:Jack a :Man ;
:hasSister :Mary .
:Mary a :Woman ;
:hasFather :Dave .
我讀過http://www.w3.org/TR/owl-ref/#Property , http://www.w3.org/TR/2002/WD-owl-semantics-20021108/syntax.html#2.3 .1.3但還是不明白如何表達這個簡單的事實。
戴夫是瑪麗的父親和傑克的瑪麗妹妹。 我想要戴夫有兩個孩子傑克和瑪麗的理由。
如果您忽略兄弟姐妹有不同父母的可能性(例如,一個共同的父母和一個不同的父母),那么您可以使用子屬性鏈來做到這一點。 如果您有以下數據:
戴夫 → hasChild Mary → hasSibling Jack
那么你會想要使用以下規則:
hasChild • hasSibling ⊑ hasChild
這將允許您推斷:
戴夫 → hasChild Jack
在 Turtle 中,它可能是這樣的:
@prefix : <http://stackoverflow.com/a/30903421/1281433/> .
@prefix a: <http://stackoverflow.com/a/30903421/1281433/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
a:Jack a owl:NamedIndividual .
a:Dave a owl:NamedIndividual ;
a:hasChild a:Mary .
a:hasChild a owl:ObjectProperty ;
owl:propertyChainAxiom ( a:hasChild a:hasSibling ) .
a:Mary a owl:NamedIndividual ;
a:hasSibling a:Jack .
a:hasSibling a owl:ObjectProperty .
a: a owl:Ontology .
這是在 Protege 中得出的結論:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.