簡體   English   中英

在Java中使用Opencyc貓頭鷹時出現DisjointClasses錯誤

[英]DisjointClasses error while using opencyc owl in java

我目前正在從事一個自然語言處理項目,試圖將openCYC用作KB。 目前,我只是嘗試使用Java owl api v3.4.8和HermiT加載本體並實例化推理程序,但是每當我嘗試實例化推理程序時,我都會收到錯誤消息

線程“主”中的異常java.lang.IllegalArgumentException:錯誤:解析了DisjointClasses( http://sw.opencyc.org/concept/Mx4rEHSj4Q0sQVGnAmZNRRJ20Q )。

當前代碼:

File ontology = new File("owl-export-unversioned.owl");

    OWLOntologyManager m = OWLManager.createOWLOntologyManager();

    System.out.println("Loading...");
    OWLOntology o = m.loadOntologyFromOntologyDocument(ontology);
    System.out.println("Loaded");

    Reasoner hermit=new Reasoner(o);
    System.out.println(hermit.isConsistent());

這是否意味着opencyc本體本身存在問題? 還是我做錯了什么?

問題是openCyc包含一個錯誤的公理:僅具有一個參數的DisjointClasses OWL規范指定DisjointClasses必須具有兩個或更多參數。

OWL API使您可以解析此本體,但是HermiT會抱怨這種公理,甚至更多。

您可以使用OWL2DLProfile檢查哪些公理違反了OWL 2 DL配置文件。 這將報告其他相同類型的錯誤公理。 但是,您將必須決定自己是正確的解決方案-OWL API尚無固定的實現。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM