Skip to content

Instantly share code, notes, and snippets.

@baskaufs
Last active August 23, 2023 01:14
Show Gist options
  • Save baskaufs/248b61ae46915d86762d9474e31520e3 to your computer and use it in GitHub Desktop.
Save baskaufs/248b61ae46915d86762d9474e31520e3 to your computer and use it in GitHub Desktop.
Find concepts that are equivalent to Nomenclature categories
select distinct ?iri ?prefLabel ?otherConcept ?other_label
where {
# Use bind to avoid having to enter the ID twice
bind(<https://nomenclature.info/nom/13997> as ?iri)
?iri skos:prefLabel ?prefLabel.
filter(lang(?prefLabel)="en")
# Get the equivalent AAT or Wikidata concept
optional {?iri skos:exactMatch ?otherConcept.}
# Get the equivalent concept label
optional {
?otherConcept skosxl:prefLabel ?labelOther.
?labelOther skosxl:literalForm ?other_label.
filter(lang(?other_label)="en")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment