简体   繁体   English

YAGO本体无法通过OWL API解析

[英]YAGO Ontology unparseable by OWL API

I'm using OWL API(5.1.7) to try and load the YAGO Ontology. 我正在使用OWL API(5.1.7)尝试加载YAGO本体。 I've downloaded both YAGO taxonomy ( YAGOTaxonomy.ttl , YAGOTaxonomy.tsv ) after doing that I created a simple java file with the following code 这样做之后,我已经下载了两个YAGO分类法( YAGOTaxonomy.ttlYAGOTaxonomy.tsv ),然后使用以下代码创建了一个简单的Java文件

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 我发现了另一个处理类似问题的stackoverflow问题, 但似乎无法解决我的问题

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 查看stacktrace,它指出找不到要加载的'.7z'文件的可解析解析器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. 尝试使用解压缩的TTL版本yagoTaxonomy.ttl.7z ,您可以在问题中发布指向的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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