Protege 5.0.0中推理机之间的差异



我在Protege 5.0.0中构建了一个小型本体。当我运行Hermit1.3.8.3推理机时,它输出状态为:

Initializing the reasoner by performing the following steps:
class hierarchy
object property hierarchy
data property hierarchy
class assertions
object property assertions
same individuals
HermiT 1.3.8.3 classified in 97ms

另一方面,当我在同一个本体上运行Fact++时,本体似乎是不一致的。输出为:

Initializing the reasoner by performing the following steps:
class hierarchy
object property hierarchy
data property hierarchy
class assertions
object property assertions
same individuals  
Error logged
java.io.IOException: invalid url
at javax.swing.JEditorPane.setPage(JEditorPane.java:418)
at org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.createCenterPanel(IntroductoryPanel.java:42)
at org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.<init>(IntroductoryPanel.java:33)
at org.protege.editor.owl.ui.explanation.io.InconsistentOntologyManager.explain(InconsistentOntologyManager.java:37)
at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.installRunningReasoner(OWLReasonerManagerImpl.java:436)
at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:375)
at java.lang.Thread.run(Thread.java:745)

我应该相信哪一个推理者。Fact++正在抛出异常"无效url"。我应该如何解决此问题?

更新#1很抱歉,我找不到发生上述情况的owl文件。但是,今天同样的事情也发生在另一个文件上,Hermit抛出Exception,但FACT正常工作:文件链接为:链接
Hermit中引发的异常为:

 Error 7 Logged at Tue Feb 24 10:27:06 IST 2015
 IOException: invalid url
 javax.swing.JEditorPane.setPage(JEditorPane.java:418)
 org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.createCenterPanel(IntroductoryPanel.java:42)
    org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.<init>(IntroductoryPanel.java:33)
    org.protege.editor.owl.ui.explanation.io.InconsistentOntologyManager.explain(InconsistentOntologyManager.java:37)
    org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.installRunningReasoner(OWLReasonerManagerImpl.java:436)
    org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:375)
    java.lang.Thread.run(Thread.java:745)

(这对应于UPDATE 1中链接的本体)

根据OWL2 DL标准,本体不一致,FaCT++在那里是正确的。本体不一致的原因如下。

1) 本体中有一个数据属性measures,描述为(只剩下相关位):

<rdf:Description rdf:about="http://www.example.com/tempsensor#measures">
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
</rdf:Description>

2) 这个属性在本体中的任何地方的用法都是:

<rdf:Description rdf:about="http://www.example.com/tempsensor#ind20">
    <measures rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">24</measures>
    <rdf:type rdf:resource="http://www.example.com/tempsensor#TempSensor"/>
</rdf:Description>

请注意,属性的范围设置为float,但实际个体中使用的值为integer。根据OWL2规范(浮点数),floatinteger是不相交的数据类型。

似乎出于实际原因,HermiT放宽了形式数据类型的限制,而FaCT++则保持接近标准。

FaCT++不会抛出IOExceptions,也不会尝试检查IRI的有效性。Error logged消息让我觉得Protege发现了某种异常——可能是一个不一致的本体异常,但很难从这个消息中判断出来。您在Protege中有其他输出吗?推理错误可能会在左上角的红色三角形下报告,而不仅仅是在控制台中。

编辑:以下是抛出异常的行:

    URL help = getClass().getResource("InconsistentOntologyHelp.html");
    tp.setPage(help);
    Font font = UIManager.getFont("TextArea.font");

问题似乎是帮助URL不正确——在这种情况下,这可能意味着不存在。对不一致的解释似乎不正确。

正如Dmitry Tsarkov所指出的,这揭示了一个问题:FaCT++和HermiT在本体论是一致的还是不一致的问题上存在分歧。这是一个单独的问题,因为您看到的异常是在Protege代码中生成的,但仍然是一个令人担忧的问题——感谢您提供的示例。我将在推理机页面上打开一个问题进行调试和修复。

最新更新