Skip to content
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

owlrl relies on OWL.Datatype which does not exist in the OWL namespace in rdflib #53

Open
jgeluk opened this issue Feb 23, 2022 · 9 comments

Comments

@jgeluk
Copy link
Contributor

jgeluk commented Feb 23, 2022

This line fails with rdflib 6.1.1 because the OWL namespace defined in rdflib does not support the OWL.Datatype property:

to_be_removed.add((OWL.DataRange, RDFS.subClassOf, OWL.Datatype))

@jgeluk
Copy link
Contributor Author

jgeluk commented Feb 23, 2022

@jgeluk
Copy link
Contributor Author

jgeluk commented Feb 23, 2022

Workaround:

OWL._fail = False

jgeluk added a commit to EKGF/ekglib that referenced this issue Feb 23, 2022
jgeluk added a commit to EKGF/OWL-RL that referenced this issue Sep 14, 2022
@jgeluk
Copy link
Contributor Author

jgeluk commented Sep 14, 2022

Renamed OWL.Datatype to OWL.DatatypeProperty in this fork: https://github.com/EKGF/OWL-RL

@jjoao
Copy link

jjoao commented Oct 9, 2022

This looks a cut and paste like a typo:
OWL:Datatype should be RDFS:Datatype

@jjoao
Copy link

jjoao commented Oct 9, 2022

Renamed OWL.Datatype to OWL.DatatypeProperty in this fork: https://github.com/EKGF/OWL-RL

This is not ideal: you are adding "to be removes triple" like
to_be_removed.add((OWL.DataRange, OWL.equivalentClass, RDFS.Datatype))
That will never happens (and fail to remove some noise)
=> RDFS:Datatype

@jgeluk
Copy link
Contributor Author

jgeluk commented Oct 10, 2022

Alright, makes sense.

@majidaldo
Copy link

can this be merged asap? seems like a trivial fix.

@djherron
Copy link

I had the same issue. I agree with the assessment made by @jjoao . It looks like copy/paste typo errors in two lines in the method 'post_process(self)' of class OWLRL_Extension_Trimming. Consider these 3 lines of code:

    to_be_removed.add((RDFS.Datatype, OWL.equivalentClass, OWL.DataRange))
    to_be_removed.add((OWL.DataRange, RDFS.subClassOf, OWL.Datatype))
    to_be_removed.add((OWL.DataRange, OWL.equivalentClass, OWL.Datatype))

The first of these 3 lines refers to RDFS.Datatype, but the other two lines mistakenly refer to OWL.Datatype, which doesn't exist in the OWL namespace. So a fix involves changing OWL.Datatype to RDFS.Datatype in these two lines.

@majidaldo
Copy link

bump

nicholascar added a commit that referenced this issue Jun 16, 2024
Fix issue #53 and upgrade rdflib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants