OWOL API无法解析的YAGO本体

时间:2018-10-17 03:05:09

标签: java parsing owl owl-api turtle-rdf

我正在使用OWL API(5.1.7)尝试加载YAGO本体。在我用以下代码创建了一个简单的Java文件之后,我已经下载了YAGO分类法(YAGOTaxonomy.ttlYAGOTaxonomy.tsv

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();
    }

问题是,当我运行它时,出现系统似乎无法解析它的错误。

 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

我发现了另一个stackoverflow问题,该问题处理类似的but it doesn't seem to solve my issue

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:2)

查看stacktrace,它指出找不到您要加载Problem parsing file:/H:/toplevel/myDownloads/yagoTaxonomy.tsv.7z的'.7z'文件的可解析解析器

尝试使用解压后的TTL版本yagoTaxonomy.ttl.7z,您可以在问题中发布指向的链接。