Rdf OWL中的a-B-C关系推理

Rdf OWL中的a-B-C关系推理,rdf,owl,protege,rdfs,Rdf,Owl,Protege,Rdfs,假设我们有3个人 A = John (Father -> Man -> Thing) B = Bob (Child -> Thing) C = Mary (Mother -> Woman -> Thing) 班级 Child Father -> Man Mother -> Woman 对象属性 hasSpouse (symmetric) isFatherOf (in range of child) 那么我只主张 John hasSpouse Ma

假设我们有3个人

A = John (Father -> Man -> Thing) 
B = Bob (Child -> Thing)
C = Mary (Mother -> Woman -> Thing)
班级

Child
Father -> Man
Mother -> Woman
对象属性

hasSpouse (symmetric)
isFatherOf (in range of child)
那么我只主张

John hasSpouse Mary
John isFatherOf Bob
有没有可能推断玛丽是鲍勃的另一半

下面的代码只能通过告诉“母亲是父亲”来推断“玛丽是母亲”

但是我如何在bob的对象属性断言中推断断言呢

通过添加新对象属性,然后对其应用一些条件

乌龟

@前缀:。
@前缀owl:。
@前缀rdf:。
@前缀xml:。
@前缀xsd:。
@前缀rdfs:。
@基地。
rdf:type owl:Ontology。
#################################################################
#对象属性
#################################################################
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#hasSpouse
:hasSpouse rdf:type owl:ObjectProperty,
猫头鹰:对称性属性。
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#isFatherOf
:isFatherOf rdf:type owl:ObjectProperty;
rdfs:range:Child。
#################################################################
#班级
#################################################################
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#Child
:子rdf:type owl:Class。
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#Father
:父rdf:type owl:Class;
owl:equalentClass[rdf:type owl:Restriction;
owl:onProperty:isFatherOf;
猫头鹰:一些值来自:Child
] ;
rdfs:子类:人。
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#Man
:Man rdf:type owl:Class。
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#Mother
:Mother rdf:type owl:Class;
owl:equalentClass[rdf:type owl:Restriction;
owl:onProperty:hasSpouse;
猫头鹰:一些来自父亲的价值观
] ;
rdfs:子类:女性。
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#Woman
:Woman rdf:type owl:Class。
#################################################################
#个人
#################################################################
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#Bob
:Bob rdf:type owl:NamedIndividual。
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#John
:John rdf:type owl:NamedIndividual;
:哈斯普鲁斯:玛丽;
例如:鲍勃。
###  http://www.semanticweb.org/monsterstep/ontologies/2018/5/untitled-ontology-4#Mary
:Mary rdf:type owl:NamedIndividual。

###由OWL API生成(版本4.2.8.20170104-2310)https://github.com/owlcs/owlapi
然而,SWRL规则是建立这种关系模型的方法好的,我更新了我的问题,有一个错误的陈述,应该是“John hasSpouse Mary”。好的,让我看看我如何在有SWRL的protege中做到这一点。谢谢@AKSW