我想在 OWL 中使用属性链并在 FUSEKI/OWLIM 中获取推理,但我无法使用 OWL2 属性链进行推理。
我使用Protege工具来定义本体。本体文件包含"hasGrandParent"对象属性的以下属性链
- hasParent • hasParent
- → hasGrandParent
在 Protege 中启用推理器时,推理工作正常并显示关系(hasGrandParent 关系),但是当将相同的本体文件加载到 FUSEKI/OWLIM 时,推理不起作用。我肯定缺少配置的某些内容。
任何人都可以帮助解决这个问题。
GraphDB (OWLIM) 从版本 4 开始支持此功能。owl:propertyChainAxiom
规则 https://www.w3.org/TR/owl2-profiles/#prp-spo2 按如下方式实现:
Id: prp_spo2_1
p <owl:propertyChainAxiom> pc
start pc last [Context <onto:_checkChain>]
----------------------------
start p last
Id: prp_spo2_2
pc <rdf:first> p
pc <rdf:rest> t [Constraint t != <rdf:nil>]
start p next
next t last [Context <onto:_checkChain>]
----------------------------
start pc last [Context <onto:_checkChain>]
Id: prp_spo2_3
pc <rdf:first> p
pc <rdf:rest> <rdf:nil>
start p last
----------------------------
start pc last [Context <onto:_checkChain>]
但是,如果您将自己限制为长度为 2 的链,则可以更快地实现类似的功能。看这里: http://vladimiralexiev.github.io/pres/extending-owl2/