Owlready2 parsing error with sync_reasoner

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Owlready2 parsing error with sync_reasoner

tharindu_mp
The ontology was created using protege and populated data from database using the owlready2 library. Now this line is giving this error:

sync_reasoner(my_world)
-------------------------------------------
This is the error I encountered:

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) RDFXMLParser
2) OWLXMLParser
3) OWLFunctionalSyntaxOWLParser
4) TurtleOntologyParser
5) OWLOBOParser
6) KRSS2OWLParser
7) ManchesterOWLSyntaxOntologyParser

Detailed logs:
--------------------------------------------------------------------------------
Parser: RDFXMLParser
org.xml.sax.SAXParseException; systemId: file:///C:/Users/THARIN~2/AppData/Local/Temp/tmpin0r193y; lineNumber: 1; columnNumber: 8; Element type "http:" must be followed by either attribute specifications, ">" or "/>".

--------------------------------------------------------------------------------
Parser: OWLXMLParser
org.xml.sax.SAXParseException; systemId: file:///C:/Users/THARIN~2/AppData/Local/Temp/tmpin0r193y; lineNumber: 1; columnNumber: 8; Element type "http:" must be followed by either attribute specifications, ">" or "/>".

--------------------------------------------------------------------------------
Parser: OWLFunctionalSyntaxOWLParser
Encountered " <FULLIRI> "<http://www.semanticweb.org/yashoda/ontologies/2017/12/MovieOnto> "" at line 1, column 1.
Was expecting:
    "Ontology" ...
     (Line 0)

--------------------------------------------------------------------------------
Parser: TurtleOntologyParser
uk.ac.manchester.cs.owl.owlapi.turtle.parser.ParseException: Encountered " <ERROR> "< "" at line 64, column 1.
Was expecting:
    <EOF> 
   

--------------------------------------------------------------------------------
Parser: OWLOBOParser
org.coode.owlapi.obo.parser.ParseException: Encountered "<EOF>" at line 941, column 114.
Was expecting one of:
    "[" ...
    <TAG_NAME> ...
    <QUOTED_STRING> ...
    <STRING> ...
    <TAG_VALUE_WS> ...
    <COMMENT> ...
     (Line 941)

--------------------------------------------------------------------------------
Parser: KRSS2OWLParser
de.uulm.ecs.ai.owlapi.krssparser.ParseException: Encountered " ">" "<http://www.semanticweb.org/yashoda/ontologies/2017/12/MovieOnto> "" at line 1, column 1.
Was expecting:
    <EOF> 
   

--------------------------------------------------------------------------------
Parser: ManchesterOWLSyntaxOntologyParser
Encountered <http://www.semanticweb.org/yashoda/ontologies/2017/12/MovieOnto> at line 1 column 1. Expected one of:
        Individual:
        AnnotationProperty:
        Datatype:
        DataProperty:
        ObjectProperty:
        DisjointProperties:
        ValuePartition:
        EquivalentClasses:
        Import:
        Prefix:
        DisjointClasses:
        Class:
        SameIndividual:
        DifferentIndividuals:
 (Line 1)

Reply | Threaded
Open this post in threaded view
|

Re: Owlready2 parsing error with sync_reasoner

Jiba
Administrator
Could you send me the ontology on which you are calling the reasoner? It seems it did not serialized well.

Best regards,
Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Owlready2 parsing error with sync_reasoner

Jiba
Administrator
In reply to this post by tharindu_mp
Hello,

I've looked at the ontology you sent me.

The problem is caused by some individual names that are not proper URL (or IRI), for example:

    <Declaration>
        <NamedIndividual IRI="# After being coerced into working for a crime boss, a young getaway driver finds himself taking part in a heist doomed to fail. "/>
    </Declaration>

    <Declaration>
        <NamedIndividual IRI="#https://www.imdb.com//title/tt5580036/?ref_=tt_urv"/>
    </Declaration>

Owlready is quite "laxist" and accepts these IRI, but HermiT is more strict and does not accept space in IRI.

Best regards,
Jean-Baptiste Lamy
MCF, LIMICS, Université Paris 13