简体   繁体   中英

Loading YAGO Ontology with OWL API

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM