简体   繁体   中英

YAGO Ontology unparseable by OWL API

I'm using OWL API(5.1.7) to try and load the YAGO Ontology. I've downloaded both YAGO taxonomy ( YAGOTaxonomy.ttl , YAGOTaxonomy.tsv ) after doing that I created a simple java file with the following code

OWLOntologyManager man = OWLManager.createOWLOntologyManager();
    try {
        OWLOntology ow = man.loadOntologyFromOntologyDocument(new File(filed));
        System.out.println(ow);
    } catch (OWLOntologyCreationException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

the problem is that when i run it, i get the error that the system can't seem to parse it.

 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
org.semanticweb.owlapi.io.UnparsableOntologyException: Problem parsing file:/H:/toplevel/myDownloads/yagoTaxonomy.tsv.7z
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:
1) org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser@443118b0
2) org.semanticweb.owlapi.owlxml.parser.OWLXMLParser@6bf0219d
3) org.semanticweb.owlapi.functional.parser.OWLFunctionalSyntaxOWLParser@41c2284a
4) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.RioTurtleDocumentFormatFactory@95fd655c
5) org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxOntologyParser@c88a337
6) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.NQuadsDocumentFormatFactory@6f9c39ad
7) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.TrigDocumentFormatFactory@27e81c
8) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.NTriplesDocumentFormatFactory@937ecd36
9) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.RDFJsonDocumentFormatFactory@cd748dc3
10) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.RDFJsonLDDocumentFormatFactory@dcacc47d
11) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.N3DocumentFormatFactory@9a5
12) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.RioRDFXMLDocumentFormatFactory@69b9a3bc
13) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.TrixDocumentFormatFactory@27e82d
14) org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParser@723e88f9
15) org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser@4c012563
16) org.semanticweb.owlapi.dlsyntax.parser.DLSyntaxOWLParser@13b3d178
17) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.BinaryRDFDocumentFormatFactory@3bf24493
18) org.semanticweb.owlapi.krss2.parser.KRSS2OWLParser@704deff2
19) org.semanticweb.owlapi.rio.RioParserImpl : org.semanticweb.owlapi.formats.RDFaDocumentFormatFactory@264e8d

I found another stackoverflow question that dealt with something similar but it doesn't seem to solve my issue

Any help would be greatly appreciated.

Looking at the stacktrace, it state that could not find sutable parser for '.7z' file you attmpt to load Problem parsing file:/H:/toplevel/myDownloads/yagoTaxonomy.tsv.7z

Try out with the unpacked TTL versiion yagoTaxonomy.ttl.7z which you post a link to in your question.

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