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

skos:prefLabel etc entailment not showing up in rdfs:label #77

Open
doriantaylor opened this issue Nov 23, 2022 · 3 comments
Open

skos:prefLabel etc entailment not showing up in rdfs:label #77

doriantaylor opened this issue Nov 23, 2022 · 3 comments

Comments

@doriantaylor
Copy link
Contributor

Hey, just noticed that (after applying RDF::Reasoner), skos:prefLabel/skos:altLabel/skos:hiddenLabel .subPropertyOf points to rdfs:label but not the other other way around. Haven't looked at the code for a while so not sure why that would be the case.

@gkellogg
Copy link
Member

So, to be clear, if you require rdf/reasoner and do RDF::Reasoner.apply(:rdfs) I can see that

RDF::Vocab::SKOS.prefLabel.entail(:subPropertyOf).map(&:pname) # => [ "rdfs:label", "skos:prefLabel" ]

But,

RDF::RDFS.label.entail(:subProperty).map(&:pname) # => [ "rdfs:label" ]

and you'd expect it to include everything that has a subPropertyOf relationship back to rdfs:label?

I'll need to look into this, such entailments work for other vocabularies, as contained within the specs. It may be related to owl:imports.

@doriantaylor
Copy link
Contributor Author

doriantaylor commented Nov 24, 2022

indeed:

[1] pry(main)> require 'linkeddata' # hauls in the relevant modules, of course
=> true                            
[2] pry(main)> RDF::Reasoner.apply :rdfs
=> [:rdfs]                              
[3] pry(main)> RDF::Vocab::RDFS.label
=> #<RDF::Vocabulary::Term:0x4cbbc ID:http://www.w3.org/2000/01/rdf-schema#label>  
[4] pry(main)> RDF::Vocab::RDFS.label.subProperty
=> []                                            
[5] pry(main)> RDF::Vocab::SKOS.prefLabel.subPropertyOf
=> [#<RDF::Vocabulary::Term:0x4cbbc ID:http://www.w3.org/2000/01/rdf-schema#label>]

that's with rdf 3.2.9, rdf-vocab 3.2.3, rdf-reasoner 0.8.0. Maybe the SKOS vocab indeed does not have an explicit owl:imports RDFS?

@gkellogg
Copy link
Member

Sorry to take so long to respond to this issue. If you look at the documentation for RDF::Reasoner::RDFS.subProperty, you'll see that it works within the vocabulary in which it is defined as well as vocabularies which import that vocabulary.

Get the immediate subproperties of this property.

This iterates over terms defined in the vocabulary of this term, as well as the vocabularies imported by this vocabulary.

So, for RDFS.label.subProperty to include SKOS.prefLabel, SKOS would need to do an owl:includes or RDFS. This was done in order to contain the combinatorics of adding new vocabularies, so that it wouldn't need to traverse every defined vocabulary too look for all possible values. So, this behavior should be unchanged from previous versions.

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

2 participants