Loading YAGO Ontology with OWL API

試著忘記壹切 提交于 2019-12-24 05:53:07

问题


I’m using the OWL API (3.4.8 for compatibility reasons) for the first time, and I’m trying to load an ontology that is provided as part of the YAGO knowledge base (http://resources.mpi-inf.mpg.de/yago-naga/yago3.1/yagoSimpleTaxonomy.ttl.7z). However I keep getting the following warning:

[main] WARN org.obolibrary.oboformat.parser.OBOFormatParser - LINE: 629693 Expected white space at pos: 44  LINE:
<wikicat_Gardens_in_Aomori_Prefecture>  rdfs:subClassOf <yagoGeoEntity> .

(I just copied one example, but I get this warning for every line in the turtle file, and the printed position is always the colon.)

Here’s the code that produces those warnings:

OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(new File("../data/yago/yagoSimpleTaxonomy.ttl"));

Even though they are just logged as warnings and there is no exception thrown, the program gets stuck at this point. So, it seems like there is some kind of issue that I need to sort out. Could anyone tell me what’s going on here?


回答1:


As it turned out, some of the URIs in the YAGO ontology contain \n. Removing those \ns from the URIs that were concerned fixed the problem.



来源:https://stackoverflow.com/questions/45928222/loading-yago-ontology-with-owl-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!