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

report: errors on dcat3; undocumented errors #1229

Open
VladimirAlexiev opened this issue Nov 29, 2024 · 9 comments
Open

report: errors on dcat3; undocumented errors #1229

VladimirAlexiev opened this issue Nov 29, 2024 · 9 comments

Comments

@VladimirAlexiev
Copy link

VladimirAlexiev commented Nov 29, 2024

curl -O https://www.w3.org/ns/dcat3.ttl
robot -v report --input dcat3.ttl|less

Produces these:

  • ERROR org.obolibrary.robot.IOHelper - Input ontology contains 3 triple(s) that could not be parsed
 - <http://www.w3.org/ns/dcat#previousVersion> <http://www.w3.org/2002/07/owl#equivalentProperty> <http://purl.org/pav/previousVersion>.
 - <http://www.w3.org/ns/dcat#version> <http://www.w3.org/2002/07/owl#equivalentProperty> <http://purl.org/pav/version>.
 - <http://www.w3.org/ns/dcat#hasCurrentVersion> <http://www.w3.org/2002/07/owl#equivalentProperty> <http://purl.org/pav/hasCurrentVersion>.
  • What's wrong with these triples?
  • WARN org.obolibrary.robot.IOHelper - Could not create IRI for Slovník pro datové katalogy@cs
    • Why would it want to interpret this label as IRI? It appears with these props:
  dcterms:title "Slovník pro datové katalogy"@cs ;
  rdfs:label "Slovník pro datové katalogy"@cs ;
  • WARN org.obolibrary.robot.IOHelper - Cannot invoke "java.util.Map.keySet()" because "expanded" is null
    • I think that's due to the prev error
  • WARN org.obolibrary.robot.providers.CURIEShortFormProvider - Unable to find namespace for: http://www.w3.org/ns/dcat#Resource
    • What does this mean? (@prefix dcat: is defined)
  • multiple_labels http://www.w3.org/ns/dcat rdfs:label Slovn<ED>k pro datov<E9> katalogy@cs
    • Having labels in multiple languages is not only allowed, but also a good practice
    • Why does it garble the unicode char here? It printed it ok above. I bet this is due to the failed attempt to treat it as IRI

Last but not least: none of these are documented at http://robot.obolibrary.org/errors

@jamesaoverton
Copy link
Member

ROBOT is focused on Open Bio Ontologies (OBO), and report is particularly OBO-centric. I don't think it will be helpful to run robot report on DCAT3.

The triple parsing error comes from OWLAPI. You could try loading the file with OWLAPI to isolate the problem.

report uses Apache Jena SPARQL, and some of the problems could come from that layer.

You point out several things that could be improved in ROBOT, which I appreciate, but I do not have time to address them. ROBOT is an un-funded, open source project. I hope that someone from the community will see this issue and follow up, or that you will be able to isolate the problems and suggest a Pull Request to fix them.

@VladimirAlexiev
Copy link
Author

Your reaction for the other 2 issues was extremely fast! But Nobody should expect fixes the same hour, day or week for every problem.

So this issue can serve as an anchor for discussion and clarification on the reported problems.

I think that "Could not create IRI" is a logical error since it should not try to make IRI from a literal?

@balhoff
Copy link
Contributor

balhoff commented Nov 29, 2024

I think the problem with the three triples that could not be parsed is that the ontology should not be using owl:equivalentProperty with annotation properties. These look like they're typed as object properties in the ontology, but then they're used as properties for ontology annotations, so my guess is that the OWL API is deciding that they're annotation properties early on. And you can't have the same IRI for an annotation property and an object property. Using the properties as object properties would be fine if the ontology IRI could be interpreted as an individual, but I don't remember the spec saying how punning (using the same IRI for a class, individual, and/or property) applies to the ontology IRI. Just a guess!

@VladimirAlexiev
Copy link
Author

@balhoff Which OWL spec says that owl:equivalentProperty is only used on object properties?

@matentzn
Copy link
Contributor

matentzn commented Dec 2, 2024

It's very well hidden in a comment in this section: https://www.w3.org/TR/owl2-new-features/#F12:_Punning

"it requires that a name cannot be used for both a class and a datatype and that a name can only be used for one kind of property."

However I believe this is allowed in OWL Full, so I am not too sure why this axiom is dropped. I do agree though with @balhoff theory. OWL API might be imposing OWL 2 DL constraints here. This is as @jamesaoverton suggests though an issue for the owl api tracker. Cc @ignazio1977

@ignazio1977
Copy link
Contributor

From memory, punning is not defined for ontologies. An ontology IRI is just an IRI, so it can (should) be usable in regular annotation axioms. Having said that, ontology annotations are a special thing and are not axioms in the ontology, so where the annotations appear might make a difference.

Punning annotations and object properties: big no no. Parsing is not done according to usage but declared types, so using a property declared as object as annotation will strain a number of seams. Wouldn't surprise me if this was the root issue here.

@VladimirAlexiev
Copy link
Author

@balhoff's theory is that rdfs:label (an annotation property, although it is very often used as a data property in instance data)
is treated as an object property.
AFAIK annotation properties should also know whether they point to another node (resource/object) or have a literal value. So I think it's valid to say rdfs:label a owl:AnnotationProperty, owl:DatatypeProperty.
But even if that's not true, there is no justification to treat rdfs:label as an object property.

@ignazio1977
Copy link
Contributor

Using a literal as value for an annotation property is perfectly valid but it does not make it a data property. The distinction is on their domain, data properties have individuals for their domain, and are not ignored by reasoners, while annotation properties have things that aren't individuals - they can annotate axioms, ontologies, or IRIs of classes/properties/etc, and are ignored by reasoners.

@balhoff
Copy link
Contributor

balhoff commented Dec 2, 2024

@balhoff's theory is that rdfs:label (an annotation property, although it is very often used as a data property in instance data) is treated as an object property. AFAIK annotation properties should also know whether they point to another node (resource/object) or have a literal value. So I think it's valid to say rdfs:label a owl:AnnotationProperty, owl:DatatypeProperty. But even if that's not true, there is no justification to treat rdfs:label as an object property.

@VladimirAlexiev I was talking about these properties, I didn't mean to make any comment about rdfs:label:

  • <http://www.w3.org/ns/dcat#previousVersion>
  • <http://www.w3.org/ns/dcat#version>
  • <http://www.w3.org/ns/dcat#hasCurrentVersion>

These object properties are being used as annotation properties in the ontology, by using them to make ontology annotations. If they are (incorrectly) interpreted as annotation properties, then the owl:equivalentProperty axioms are problematic. The spec at https://www.w3.org/TR/owl2-syntax/ only defines EquivalentObjectProperties and EquivalentDataProperties axiom types, but there is no EquivalentAnnotationProperties.

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

5 participants