我在Protege 5.0.0中构建了一个小本体。当我运行Hermit 1.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".How,我应该解决这个问题吗?
更新# 1对不起,我无法找到发生上述场景的owl文件。但是,今天,在另一个文件上也发生了同样的事情,隐形眼镜抛出异常,但事实正常工作:链接到文件是:链接。
在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)发布于 2015-02-24 13:55:19
(这对应于更新1中链接到的本体)
本体是不一致的,根据OWL2DL标准,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。根据OWL-2规范(浮点数),float和integer是不相交的数据类型。
似乎是出于实际原因,HermiT放宽了正式的数据类型限制,而FaCT++则保持在接近标准的水平上。
发布于 2015-02-23 23:12:00
FaCT++不抛出IOExceptions,也不试图检查IRI的有效性。Error logged消息使我认为Protege遇到了某种异常--可能是一个不一致的本体异常,但是很难从这个消息中判断出来。你还有其他的输出吗?推理错误可能报告在左上角,在红色三角形下,而不只是在控制台。
编辑:以下是抛出异常的行:
URL help = getClass().getResource("InconsistentOntologyHelp.html");
tp.setPage(help);
Font font = UIManager.getFont("TextArea.font");问题似乎在于帮助URL是不正确的,在这种情况下,这可能意味着不存在。对不一致的解释似乎不正确。
正如Dmitry所指出的,这个问题揭示了一个问题: FaCT++和HermiT在本体论是一致的还是不一致的问题上存在分歧。这是另外一个问题,因为您看到的异常是在Protege代码中生成的,但仍然是一个令人担忧的问题--谢谢您提供了一个示例。我将在推理器页面上打开一个要调试和修复的问题。
https://stackoverflow.com/questions/28676009
复制相似问题