Re: #correspondencetables : from raw to triplets #correspondencetables
@Matteo, Bo, Miguel; please comment and correct!
Defining correspondence tables in RDF
Based on my reading of https://www.w3.org/TR/skos-reference/, I created the following:
@prefix bont: <http://ontology.bonsai.uno/core#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
<http://rdf.bonsai.uno/activitytype/exiobase3_3_17/A_POWC> a bont:ActivityType ;
skos:prefLabel "Production of electricity by coal" .
skos:altLabel "A_POWC" .
skos:narrowMatch <http://rdf.bonsai.uno/activitytype/entsoe/fbcl> .
<http://rdf.bonsai.uno/activitytype/entsoe/fbcl> a bont:ActivityType ;
skos:prefLabel "Fossil Brown coal/Lignite" .
skos:broadMatch <http://rdf.bonsai.uno/activitytype/exiobase3_3_17/A_POWC> .
<http://rdf.bonsai.uno/activitytype/exiobase3_3_17/A_POWN> a bont:ActivityType ;
skos:prefLabel "Production of electricity by nuclear" .
skos:altLabel "A_POWN" .
skos:exactMatch <http://rdf.bonsai.uno/activitytype/entsoe/nuke> .
<http://rdf.bonsai.uno/activitytype/entsoe/nuke> a bont:ActivityType ;
skos:prefLabel "Nuclear" .
This has been very helpful for me, as it has helped build a mental model of how to express hierarchical relations, codes, etc. For sure, I have made mistakes though!
1. It is unclear to me whether or not `narrowMatch` and `broadMatch` are transitive.
2. Do we need to declare `narrowMatch` and `broadMatch`?
3. Can we drop `rdfs:label` completely in favor of `skos:prefLabel`?
4. Do we agree on using `skos:altLabel` for codes?
5. Partial overlaps, as mentioned by Bo. There are possibilities to describe this in SKOS, but I don't know what approach is best.
Next steps for correspondence tables repo
I still think that the first step should be getting all the basic data (labels, codes, and URIs) into arborist, followed by the official correspondence lists using the above format. The example that Miguel posted should never be needed (A -> C, when we knew A -> B and B -> C), as we should be able to get this transitive relationship "automatically" though SPARQL queries (and we need to learn how to write these queries in any case).
We can then proceed with our own self-generated correspondences; there are a number of libraries to help with this besides fuzzywuzzy (though it does have the best name :)
Some research and trial phases would be necessary before picking any particular approach.