从EFO进行OWL解析 [英] OWL Parsing From EFO

查看:82
本文介绍了从EFO进行OWL解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在不停地尝试解析实验因子本体"(EFO)文件,但是我无法对其进行解析.我拥有的文件可以在Protege中很好地打开,但是我似乎无法将其加载到Java中.我看了几套示例代码,看似准确地复制了它们,但是我不明白为什么解析失败.这是我的代码:

I have been trying endlessly to parse the Experimental Factor Ontology (EFO) file, but I am not able to parse it. The file I have opens fine in Protege, but I cannot seem to get it to load in Java. I have looked at a few sets of example code, and I am copying them seemingly exactly, but I do not understand why parsing fails. Here is my code:

System.setProperty("entityExpansionLimit","100000000");
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
URI uri = URI.create("file:~/efo.owl");
IRI iri = IRI.create(uri);
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(iri);

这是我得到的错误:

Could not load ontology: Problem parsing 
file:/~/efo.owl
Could not parse ontology.  Either a suitable parser could not be found, or 
parsing failed.  See parser logs below for explanation.
The following parsers were tried:

谢谢,我知道已经发布了一些类似的帖子,但是我一直无法弄清楚,而且非常绝望!如有必要,我可以提供堆栈跟踪,但是每个解析器都有一个跟踪.

Thank you, I know some similar posts have been made, but I have been unable to figure it out and am quite desperate! I can provide the stack trace if necessary, but it is quite long as there is a trace for each parser.

推荐答案

本地下载的文件一定有问题.直接从IRI本体加载本体.

There must be something wrong with the local, downloaded file. Loading the ontology directly from the ontology IRI worked.

这篇关于从EFO进行OWL解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆