如何在OWL/GraphDB中为具有多个属性的类创建规则?



Animal_Lover类是一个具有三个属性的类,称为hasPet

史密斯养了三只动物,属于Person类。

此时,我如何编写规则(.pie(以在规则工作时自动将smith包含在animal_lover类中?

Prefices {
test : http://www.example.com/test#
rdf : http://www.w3.org/1999/02/22-rdf-syntax-ns#
owl : http://www.w3.org/2002/07/owl#
xsd : http://www.w3.org/2001/XMLSchema#
rdfs : http://www.w3.org/2000/01/rdf-schema#
}
Axioms {}
Rules {
Id: rule1
a <test:hasPet> b
a <test:hasPet> d
a <test:hasPet> c           
-----------------------
a <rdf:type> <test:Animal_Lover>
}

此规则不起作用。

您是否在日志中查找了任何错误?这一行对我来说似乎很可疑,我认为括号应该在不同的行上

Axioms {}

最新更新