owlprotegehermit

How to determine where the problem is in an ontology from HermiT output


I am quite new in protege. I have been able to run some of the examples like pizza.owl or travel.owl. I then opened an ontology that someone else created and when I run the HermiT reasoner I get the following error:

An error occurred during reasoning: String '^(\(?\+?[0-9]*\)?)?[ \.\-])?(\(?[0-9]*\)?)?[0-9A-Z \.\-\(\)]*((x|ext|extension)? ?[0-9]*)?$' in the datatype restriction org.semanticweb.HermiT.datatypes.rdfplainliteral.RDFPlainLiteralDatatypeHandler@64cf23b2 is not a valid regular expression..
org.semanticweb.HermiT.datatypes.UnsupportedFacetException: String '^(\(?\+?[0-9]*\)?)?[ \.\-])?(\(?[0-9]*\)?)?[0-9A-Z \.\-\(\)]*((x|ext|extension)? ?[0-9]*)?$' in the datatype restriction org.semanticweb.HermiT.datatypes.rdfplainliteral.RDFPlainLiteralDatatypeHandler@64cf23b2 is not a valid regular expression.
    at org.semanticweb.HermiT.datatypes.rdfplainliteral.RDFPlainLiteralDatatypeHandler.validateDatatypeRestriction(RDFPlainLiteralDatatypeHandler.java:126) ~[na:na]
    at org.semanticweb.HermiT.datatypes.DatatypeRegistry.validateDatatypeRestriction(DatatypeRegistry.java:113) ~[na:na]
    at org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.visit(OWLClausification.java:880) ~[na:na]
    at uk.ac.manchester.cs.owl.owlapi.OWLDatatypeRestrictionImpl.accept(OWLDatatypeRestrictionImpl.java:136) ~[na:na]
    at org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.convertDataRange(OWLClausification.java:820) ~[na:na]
    at org.semanticweb.HermiT.structural.OWLClausification$NormalizedAxiomClausifier.visit(OWLClausification.java:647) ~[na:na]
    at uk.ac.manchester.cs.owl.owlapi.OWLDataAllValuesFromImpl.accept(OWLDataAllValuesFromImpl.java:82) ~[na:na]
    at org.semanticweb.HermiT.structural.OWLClausification.clausify(OWLClausification.java:235) ~[na:na]
    at org.semanticweb.HermiT.structural.OWLClausification.preprocessAndClausify(OWLClausification.java:165) ~[na:na]
    at org.semanticweb.HermiT.Reasoner.loadOntology(Reasoner.java:211) ~[na:na]
    at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:202) ~[na:na]
    at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:176) ~[na:na]
    at org.semanticweb.HermiT.ReasonerFactory.createHermiTOWLReasoner(ReasonerFactory.java:51) ~[na:na]
    at org.semanticweb.HermiT.ReasonerFactory.createReasoner(ReasonerFactory.java:19) ~[na:na]
    at org.protege.editor.owl.model.inference.ReasonerUtilities.createReasoner(ReasonerUtilities.java:20) ~[na:na]
    at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.ensureRunningReasonerInitialized(OWLReasonerManagerImpl.java:428) ~[na:na]
    at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:386) ~[na:na]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_121]

It appears to be some issue with a string defined in the ontology (but I might be wrong). Any suggestion on how to determine where the issue is in the ontology?

I am using Protege 5.5.0

Thanks!


Solution

  • From

    at org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.convertDataRange(OWLClausification.java:820)
    

    it seems there is a problem with the Range specification of a Data property. So go to the "Data properties" tab in Protege and look for a data property with a Range specification and delete the range specification (assuming you have made a copy of the original ontology).

    In general when battling with an ontology I will delete axioms from the ontology till it is consistent or not giving errors. Then I will slowly add back axioms till I get a failure again.