Skip to content

Instantly share code, notes, and snippets.

@baskaufs
Created September 12, 2023 15:25
Show Gist options
  • Save baskaufs/58dbb178bd771a83548b574f38ac066e to your computer and use it in GitHub Desktop.
Save baskaufs/58dbb178bd771a83548b574f38ac066e to your computer and use it in GitHub Desktop.
Query of AAT to look at different ways broader subjects are linked
select distinct ?broader_subject ?subject_label ?broader_object ?object_label
from <http://AATOut_2Terms>
from <http://AATOut_HierarchicalRels>
where {
# http://vocab.getty.edu/aat/300043022 is the IRI for "teapots"
bind(<http://vocab.getty.edu/aat/300193015> as ?broader_subject)
?broader_subject gvp:broaderGeneric ?broader_object.
#?broader_subject gvp:broaderPreferred ?broader_object.
#?broader_subject gvp:broaderNonPreferred ?broader_object.
?broader_subject skosxl:prefLabel ?labelSubject.
?labelSubject skosxl:literalForm ?subject_label.
filter(lang(?subject_label)="en")
?broader_object skosxl:prefLabel ?labelObject.
?labelObject skosxl:literalForm ?object_label.
filter(lang(?object_label)="en")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment