Loading YAGO Ontology with OWL API

296 views Asked by At

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

There are 1 answers

0
paho On BEST ANSWER

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.