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

Mappings to external vocabularies/ontologies are not correctly added #241

Closed
dalito opened this issue Jan 23, 2025 · 1 comment · Fixed by #242
Closed

Mappings to external vocabularies/ontologies are not correctly added #241

dalito opened this issue Jan 23, 2025 · 1 comment · Fixed by #242
Assignees
Labels
bug Something is not working as expected.
Milestone

Comments

@dalito
Copy link
Member

dalito commented Jan 23, 2025

In nfdi4cat/voc4cat#117 we wanted to add a skos:broader mapping via the Additional Concept Features sheet.

We defined three mappings:

Concept IRI* ... Broader Matches
https://w3id.org/nfdi4cat/voc4cat_0005056 https://www.w3.org/ns/sosa/Sample
https://w3id.org/nfdi4cat/voc4cat_0005057 https://www.w3.org/ns/sosa/Sample
https://w3id.org/nfdi4cat/voc4cat_0005058 https://www.w3.org/ns/sosa/Sample

However, the mappings appeared in wrong turtle files (for the wrong concept):

<https://w3id.org/nfdi4cat/voc4cat_0000016>
    a skos:Concept ;
    dcterms:identifier "voc4cat_0000016"^^xsd:token ;
    rdfs:isDefinedBy <https://www.w3.org/TR/2010/NOTE-curie-20101216/> ;
    skos:broadMatch <https://www.w3.org/ns/sosa/Sample> ;
    skos:broader <https://w3id.org/nfdi4cat/voc4cat_0000186> ;
    skos:definition "The form in which the catalyst is introduced to the reaction chamber. This can include e.g., powders, pellets or thin films deposited on a substrate."@en ;
    skos:inScheme <https://w3id.org/nfdi4cat/voc4cat_> ;
    skos:prefLabel "catalyst form"@en ;
.

The other SOSA mapping were added (also wrongly) to voc4cat_0000019 and voc4cat:0007037. The three concepts to which the mapping was added were in the first three lines of the Concepts sheet. Obviously the first column in Additional Concept Features sheet is not correctly used as key to generate the mapping for the given concept.

@dalito dalito added the bug Something is not working as expected. label Jan 23, 2025
@dalito dalito self-assigned this Jan 23, 2025
@dalito dalito changed the title Mappings are not correctly added Mappings to external vocabularies/ontologies are not correctly added Jan 23, 2025
@dalito dalito moved this from New to To Do (<2 weeks) in Voc4Cat cross-repo view Jan 23, 2025
@dalito dalito moved this from To Do (<2 weeks) to In progress in Voc4Cat cross-repo view Jan 24, 2025
@dalito
Copy link
Member Author

dalito commented Jan 24, 2025

The reason for the problem is the way the sheets "Concepts" and "Additional Concept Features" are parsed. Both are read in parallel row by row. So the same IRI must be present in the same row in both sheets. Whenever the order of rows is different, the mappings are assigned wrongly because the mapping happens in principle by row and not by IRI. This behavior is inherited from the code we built upon and it should of course change.

The idea is to use the IRIs as keys to link the rows in both sheets correctly. Then it is also possible to only add the IRIs that you want to provide mappings for. Moreover, both sheets could use completely different ordering. This solution would not even break backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected.
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

1 participant