[英]How do I create a rule for a class with multiple properties in OWL/GraphDB?
Animal_Lover
class is a class that has three properties called hasPet
. Animal_Lover
类是一个具有三个属性的类,称为hasPet
。
Smith raises three animals and belongs to Person
class. Smith 养了三只动物,属于Person
类。
At this point, how do I write rule(.pie) to automatically include smith in the animal_lover class when the rule works?此时,如何编写 rule(.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>
}
this rule does not work.这个规则不起作用。
Did you look in the log for any errors?您是否在日志中查看了任何错误? This line seems suspect to me, I think the brackets should be on different lines这条线对我来说似乎很可疑,我认为括号应该在不同的线上
Axioms {}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.