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

Loading Gist v13 ontology parses numericValue/#Literal restriction on Magnitude incorrectly. #46

Open
jamesh-kaiasm opened this issue Aug 5, 2024 · 0 comments

Comments

@jamesh-kaiasm
Copy link

I'm trying to load the new Gist v13 ontology using the owlready2 library: this is freely available for download at https://www.semanticarts.com/gist/.

One of the classes is defined as follows:

<owl:Class rdf:about="https://w3id.org/semanticarts/ns/ontology/gist/Magnitude">
    <owl:equivalentClass>
        <owl:Class>
            <owl:intersectionOf rdf:parseType="Collection">
                <owl:Restriction>
                    <owl:onProperty rdf:resource="https://w3id.org/semanticarts/ns/ontology/gist/hasAspect"/>
                    <owl:someValuesFrom rdf:resource="https://w3id.org/semanticarts/ns/ontology/gist/Aspect"/>
                </owl:Restriction>
                <owl:Restriction>
                    <owl:onProperty rdf:resource="https://w3id.org/semanticarts/ns/ontology/gist/hasUnitOfMeasure"/>
                    <owl:someValuesFrom rdf:resource="https://w3id.org/semanticarts/ns/ontology/gist/UnitOfMeasure"/>
                </owl:Restriction>
                <owl:Restriction>
                    <owl:onProperty rdf:resource="https://w3id.org/semanticarts/ns/ontology/gist/numericValue"/>
                    <owl:someValuesFrom rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
                </owl:Restriction>
            </owl:intersectionOf>
        </owl:Class>
    </owl:equivalentClass>
   ...
</owl:Class>

If I load the ontology into Protege it interprets this correctly:
image

but when I load the file with owlready2 the #Literal is dropped, and my code is shown And(hasAspect(Aspect),hasUnitOfMeasure(UnitOfMeasure),numericValue(None))

If I replace the <owl:someValuesFrom rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> in the definition with <owl:someValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> it interprets as I would expect (as And(hasAspect(Aspect),hasUnitOfMeasure(UnitOfMeasure),numericValue(str))).

Can anyone explain why the rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal" is being interpreted as None? The prologue already defines xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" and while the rdfs: prefix is used consistently throughout the rest of the file, this is the only occurrence of it within a full IRI like this.

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

1 participant