essepuntato / LODE

Live OWL Documentation Environment, to convert OWL ontologies into HTML human-readable pages.
ISC License
106 stars 55 forks source link

Could not parse ontology #9

Closed ponnou closed 6 years ago

ponnou commented 6 years ago

Hello all,

I wanted to load an ontology via a local file thanks to these command lines:

URL ontologyURL = new URL(path);' 'ontology = manager.loadOntology(IRI.create(ontologyURL.toString()));

I have the following error:

Exception in thread "main" org.semanticweb.owlapi.io.UnparsableOntologyException: Problem parsing file:/C:/Test/pizza.owl 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) KRSSOWLParser 2) OWLFunctionalSyntaxOWLParser 3) KRSS2OWLParser 4) ManchesterOWLSyntaxOntologyParser 5) OWLXMLParser 6) OWLOBOParser

Detailed logs:

Parser: KRSSOWLParser Encountered " ">" "<?xml version=\"1.0\"?> "" at line 1, column 1. Was expecting:

(Line 0) -------------------------------------------------------------------------------- Parser: OWLFunctionalSyntaxOWLParser Encountered " "< "" at line 1, column 1. Was expecting: "Ontology" ... (Line 0) -------------------------------------------------------------------------------- Parser: KRSS2OWLParser de.uulm.ecs.ai.owlapi.krssparser.ParseException: Encountered " ">" " "" at line 1, column 1. Was expecting: -------------------------------------------------------------------------------- Parser: ManchesterOWLSyntaxOntologyParser Encountered '' at line 1 column 1. Expected either 'Ontology:' or 'Prefix:' (Line 1) -------------------------------------------------------------------------------- Parser: OWLXMLParser Attribute not found: IRI (Line 49) -------------------------------------------------------------------------------- Parser: OWLOBOParser org.coode.owlapi.obo.parser.TokenMgrError: Lexical error at line 1, column 22. Encountered: "\r" (13), after : "" at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:308) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:830) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:750) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:708) at it.essepuntato.lode.LodeServlet.parseWithOWLAPI(LodeServlet.java:255) at SE.LODE_application.App.main(App.java:31) Thank you for your help.
essepuntato commented 6 years ago

HI @ponnou

It seems more an issue related with the OWLAPI than LODE, thus I suggest to contact https://github.com/owlcs/owlapi.

Have a nice day :-)

S.