使用SML确定两个不同本体之间的概念的语义度量

时间:2018-12-28 06:10:12

标签: java ontology semantics

我需要使用SML library在语义上匹配两个本体概念。 Here是他们提供的示例代码,仅比较相同本体的两个概念。

我还尝试过将两个本体加载到程序中,从而创建另一个GraphMemory。但是我们无法获得结果,因为它在SM_Engine类中具有此compare方法,该方法比较同一个本体中的两个概念,并且我们不能在该方法中使用不同本体的概念进行比较。

SM_Engine engine = new SM_Engine(g); double sim = engine.compare(sMconf, threatURI, cropURI); System.out.println("Similarity : " + sim);

这将相似性度量作为双精度值给出。但这是在同一本体的两个概念之间。

当将不同本体的URI作为参数添加到compare方法时,将引发以下异常。

Exception in thread "main" java.lang.IllegalArgumentException: The given URI <the URI of the other ontology concept> cannot be associated to a class at slib.sml.sm.core.engine.SM_Engine.throwErrorIfNotClass(SM_Engine.java:1185) at slib.sml.sm.core.engine.SM_Engine.compare(SM_Engine.java:698) at com.ontoger.core.main.SMComputationOWL.main(SMComputationOWL.java:76)

我想要的是获得两个不同本体中两个概念的语义相似度。有没有办法使用SML做到这一点?

0 个答案:

没有答案