-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWRL with DROOLS (protege) prefix/base error with QuantityKind vocab #819
Comments
I have followed the solution in https://stackoverflow.com/a/72390218 and added the prefix Now I am getting an out of memory error so I will try to find out more about this
|
Yes sorry, my bad. It should be
I think it is now working. It just seems to be too many axioms to compute all the OWL2 RL/RDF rules . If I reduce the set of OWL2 RL rules it is able to finish the reasoning. |
I tested importing by url http://qudt.org/2.1/schema/qudt in protege and using DROOLS and the reasoning works. However, when I only import the vocabulary http://qudt.org/2.1/vocab/quantitykind I need to save a copy of the vocabulary and add
due to how protege works with the SWRL plugin |
I have done a more detailed inspection. When I import the vocabulary from the URL http://qudt.org/2.1/vocab/quantitykind and then save it as a local turtle file in protege the first lines look as follows. @prefix : <http://www.semanticweb.org/owl/owlapi/turtle#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix mc: <http://www.linkedmodel.org/owl/schema/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix qkdv: <http://qudt.org/vocab/dimensionvector/> .
@prefix qudt: <http://qudt.org/schema/qudt/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix soqk: <http://qudt.org/vocab/soqk/> .
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix vaem: <http://www.linkedmodel.org/schema/vaem#> .
@prefix voag: <http://voag.linkedmodel.org/schema/voag#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix constant: <http://qudt.org/vocab/constant/> .
@prefix quantitykind: <http://qudt.org/2.1/vocab/quantitykind#> .
@base <http://qudt.org/2.1/vocab/dimensionvector> . What I dont get is why the base is changed by protege to I have changed the base to @prefix : <http://www.semanticweb.org/owl/owlapi/turtle#> .
@prefix _: <http://qudt.org/2.1/vocab/quantitykind> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix mc: <http://www.linkedmodel.org/owl/schema/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix qkdv: <http://qudt.org/vocab/dimensionvector/> .
@prefix qudt: <http://qudt.org/schema/qudt/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix soqk: <http://qudt.org/vocab/soqk/> .
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix vaem: <http://www.linkedmodel.org/schema/vaem#> .
@prefix voag: <http://voag.linkedmodel.org/schema/voag#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix constant: <http://qudt.org/vocab/constant/> .
@prefix quantitykind: <http://qudt.org/2.1/vocab/quantitykind#> .
@base <http://qudt.org/2.1/vocab/quantitykind> . |
Update I get the following reasoner error from the java based Drools engine
This happens when I activate the OWL 2 RL/RDF rule related to semantic vocabulary range (Table 9, scm-rng1). which is defined as
I will deactivate it for now in DROOLS (SCM_RNG1) and continue testing the vocabulary with DROOLS reasoner and report any other findings. |
I found out that the BASE IRI is decoded correctly by protege if the annotation property rdfs:isDefinedBy is deleted i.e. This happens in general with any ontology that uses |
So this is my summary so far Protege has a problem decoding the BASE IRI (see protegeproject/protege#1181) and setting it in the GUI as I showed in #819 (comment) when the annotation property And the workaround I found is to download the vocabulary from qudt and adding the prefix # baseURI: http://qudt.org/2.1/vocab/quantitykind
# imports: http://qudt.org/2.1/schema/facade/qudt
# imports: http://qudt.org/2.1/vocab/dimensionvector
@prefix constant: <http://qudt.org/vocab/constant/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix mc: <http://www.linkedmodel.org/owl/schema/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix qkdv: <http://qudt.org/vocab/dimensionvector/> .
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> .
@prefix qudt: <http://qudt.org/schema/qudt/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix soqk: <http://qudt.org/vocab/soqk/> .
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix vaem: <http://www.linkedmodel.org/schema/vaem#> .
@prefix voag: <http://voag.linkedmodel.org/schema/voag#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix _: <http://qudt.org/2.1/vocab/quantitykind/> . In addition, I think this issue is not that critical. I am importing this vocabulary in another ontology I am developing and it works without the So I guess I will leave this just as info in case someone is trying to reason with DROOLS in protege and bumps into this issue :) |
For my use case I need to create individuals with SWRL syntax
swrlx:makeOWLThing
. As mentioned here #62 (comment), reasoning seems to be working fine with Pellet in Protege but Pellet does not support this syntax. Hence, I am using DROOLS in protege with the SWRL TabI tried importing the QuantityKind vocabulary but the owlapi which is called by starting the DROOLS reasoner in the SWRL TAB protege 5.50 gives the error:
org.semanticweb.owlapi.model.OWLRuntimeException: Prefix not registered for prefix name: _:
If I have more nformation to pinpoint this error I will update the post.
The text was updated successfully, but these errors were encountered: