Get AAT concepts including scope notes

116 views
Skip to first unread message

Vladimir Alexiev

unread,
Aug 3, 2017, 11:44:28 AM8/3/17
to Getty Vocabularies as Linked Open Data, ZENG, MARCIA
> After getting 2.2 Descendants of a Given Parent, how can you also get the scope notes (value string) for each.
> This is the question for anyone who would make a simple term list.

Hi Marcia! Here's a query:

select * {
 
?x gvp:broaderExtended aat:300194567; skos:inScheme aat: ;
     gvp
:prefLabelGVP/xl:literalForm ?label;
     skos
:scopeNote [dct:language gvp_lang:en; rdf:value ?note]
}

I've added to query 2.2: the last line looks for a scopeNote that has dct:language English, then gets its value.
I'll add this query in the next version of the doc.

Cheers! V

Reem Weda

unread,
Apr 6, 2021, 4:02:14 PM4/6/21
to Getty Vocabularies as Linked Open Data
Dear Vlamidir and Gregg,

I have a follow-up question: I have reconciled a termlist (1500 results) with AAT through the older GREL method. The newer reconciliation service did not work unfortunately). Now I would also like to get the Dutch Scope notes for all the concepts that I've found. Can I do this with a follow-up 'add collumn...'? Or is it better to feed the id's straight into the SPARQL service?
Hope to hear from you! Thanks in advance!
Cheers, Reem

Op donderdag 3 augustus 2017 om 17:44:28 UTC+2 schreef vlad...@sirma.bg:

Gregg Garcia

unread,
Apr 7, 2021, 4:54:13 PM4/7/21
to Getty Vocabularies as Linked Open Data
Hi, Reem.
First question: How did the OpenRefine not work for you?

To answer your question, you can use "add a column by fetching URLs" and embed the SPARQL query in the GREL expression. It would look something like this (untested):

Then parse out the ?dnote variable using:
value.parseJson().results.bindings[0].dnote.value  

Hope this helps.

Gregg Garcia
Software Architect
Getty Digital

Reem Weda

unread,
Apr 8, 2021, 3:50:42 AM4/8/21
to Getty Vocabularies as Linked Open Data
Hi Gregg, yes, I have installed the Getty Vocab LoD service in OpenRefine 3.4.1but when I want to use it I get an everlasting loading screen (Java? It's up to date). And I do not get any further than that. The GREL you suggested works!. Thanks a lot!
All the best
Reem

Op woensdag 7 april 2021 om 22:54:13 UTC+2 schreef Gregg Garcia:

Reem Weda

unread,
Apr 8, 2021, 4:11:05 AM4/8/21
to Getty Vocabularies as Linked Open Data
I have restarted and removed and added the reconciliation service and now it seems to work! I don't know why it would before but hurray!
Reem

Op donderdag 8 april 2021 om 09:50:42 UTC+2 schreef Reem Weda:

Reem Weda

unread,
Apr 8, 2021, 5:02:15 AM4/8/21
to Getty Vocabularies as Linked Open Data
Could I bother you again on how to get the preferred broader term in Dutch? I've found the documentation for Refine and I've got the method for Facet codes from the documentation but, for the life of me, I can't get the SPARQL query correct using gvp:broaderPreferred.

Cheers, Reem


Op donderdag 8 april 2021 om 10:11:05 UTC+2 schreef Reem Weda:

Vladimir Alexiev

unread,
Apr 20, 2021, 4:58:33 AM4/20/21
to Reem Weda, Getty Vocabularies as Linked Open Data
I guess it would be something like
'http://vocab.getty.edu/sparql.json?query=select+(str(?note)+as+?dnote)+(str(?parent)as?dparent)+{aat:'+value+'+skos:scopeNote+[dct:language+gvp_lang:nl;+rdf:value+?note];gvp:broaderPreferred/xl:prefLabel[dct:language+gvp_lang:nl;xl:literalForm?parent}'

Boy, is this a horrible way to write SPARQL...

Reem Weda

unread,
Apr 20, 2021, 8:18:26 AM4/20/21
to Getty Vocabularies as Linked Open Data
Thank you very much, Vladimir

Op dinsdag 20 april 2021 om 10:58:33 UTC+2 schreef Vladimir Alexiev:

Vladimir Alexiev

unread,
Apr 20, 2021, 1:49:13 PM4/20/21
to Reem Weda, Getty Vocabularies as Linked Open Data
Forgot closing ] just before the last }

--
You received this message because you are subscribed to the Google Groups "Getty Vocabularies as Linked Open Data" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gettyvocablo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gettyvocablod/7836aee4-5b82-403d-bd29-9b6c7cdd49a5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages