Closed senevoldsen closed 1 month ago
It looks like it may be caused by using normal Python semantics to infer literals with same value. In my case ex:Blorb
is not understood by Rdflib so it assigns it the value None
. However, since both are None
they compare equal and they add the attributes.
Another example shows the same happen with integers and booleans:
@prefix ex: <urn:example#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
ex:alpha ex:hasValue "false"^^xsd:boolean .
ex:beta ex:hasValue "0"^^xsd:integer .
Here both ex:alpha
and ex:beta
ends up with ex:hasValue
for both xsd:boolean
and xsd:integer
even though (at least I think) they are different values in RDF(S) interpretations.
None
from the self._literals()
call: those literals with value of None
should probably be filtered away before the comparison.
https://github.com/RDFLib/OWL-RL/blob/a77e1791b88b54aace609bc6000aac14c7add4ff/owlrl/RDFSClosure.py#L120-L125
Running version 6.0.2. In this example, after running the closure, both
ex:alpha
andex:beta
has both42
and22
under theex:hasValue
predicate.