RDFLib / OWL-RL

A simple implementation of the OWL2 RL Profile on top of RDFLib: it expands the graph with all possible triples that OWL RL defines. It can be used together with RDFLib to expand an RDFLib Graph object, or as a stand alone service with its own serialization.
http://www.ivan-herman.net/Misc/2008/owlrl/
Other
140 stars 30 forks source link

`range` function overshadowed by import in RDFClosure/OWLRL.py #12

Closed wrobell closed 5 years ago

wrobell commented 5 years ago

The range is imported from RDFClosure.RDFS in RDFClosure/OWLRL.py module.

This import overshadows range function therefore processing for rules like eq-diff2, eq-diff3 or prp-adp will crash an application.

wrobell commented 5 years ago

BTW. The readme file states this version passes the full batch of official OWL Full/RL tests. How to perform such test?

ashleysommer commented 5 years ago

The range is imported from RDFClosure.RDFS in RDFClosure/OWLRL.py module.

This import overshadows range function therefore processing for rules like eq-diff2, eq-diff3 or prp-adp will crash an application.

Yes, I ran into this issue last week, I know about it. I've written a fix for it on my working dev tree, but I haven't comitted it yet. I think it was caused by running python 2to3 on the code, the script changes all usages of xrange to range but it doesn't check if there already is a function called range in the code.

BTW. The readme file states this version passes the full batch of official OWL Full/RL tests. How to perform such test?

I don't know. My team only just took over the development/ownership of OWL-RL a couple of months ago, there is still a lot we don't know about the code, and testing is one of those things.

Thank you for your contribution to this project. Can I just ask, what is your motivation for improving OWL-RL? What is your use case for this tool?

wrobell commented 5 years ago

The range is imported from RDFClosure.RDFS in RDFClosure/OWLRL.py module.

This import overshadows range function therefore processing for rules like eq-diff2, eq-diff3 or prp-adp will crash an application.

Yes, I ran into this issue last week, I know about it. I've written a fix for it on my working dev tree, but I haven't comitted it yet. I think it was caused by running python 2to3 on the code, the script changes all usages of xrange to range but it doesn't check if there already is a function called range in the code.

This sound like it. :) Please share your fix.

BTW. The readme file states this version passes the full batch of official OWL Full/RL tests. How to perform such test?

I don't know. My team only just took over the development/ownership of OWL-RL a couple of months ago, there is still a lot we don't know about the code, and testing is one of those things.

IMHO, it would be good to include the tests into the code. I have created ticket #14.

Thank you for your contribution to this project. Can I just ask, what is your motivation for improving OWL-RL? What is your use case for this tool?

I want to revive the following project: https://gitlab.com/wrobell/uddo/. Such ontology needs to support a lot of telemetry data (i.e. depth, temperature, etc). Therefore efficient handling of literals is quite important for me.

ashleysommer commented 5 years ago

@wrobell this was fixed in #17