Giter Club home page Giter Club logo

Comments (1)

senevoldsen avatar senevoldsen commented on August 25, 2024

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.

  • I think the issue might be caused by the following lines. Line 124 applies Python semantics to the value equality check: I am not sure what a good fix for this is.
  • The other part is that literals with unknown datatypes receive value None from the self._literals() call: those literals with value of None should probably be filtered away before the comparison.

    OWL-RL/owlrl/RDFSClosure.py

    Lines 120 to 125 in a77e179

    literals = self._literals()
    items = (
    (lt1, lt2)
    for lt1, lt2 in product(literals, literals)
    if lt1.value == lt2.value
    )

from owl-rl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.