TGN place relationships and types

75 views
Skip to first unread message

Karl Grossner

unread,
Mar 12, 2017, 1:39:17 PM3/12/17
to Getty Vocabularies as Linked Open Data
Hi,

I'm looking to search TGN with sparql. I've got some sparql experience, but can't figure how to get a list of 1) place relationships, and 2) placeTypes.

Can someone direct me to docs, or tell me what queries would get those?

thanks!

Vladimir Alexiev

unread,
Mar 20, 2017, 7:09:30 AM3/20/17
to Getty Vocabularies as Linked Open Data
See these links:
 Eg here's a query to get all relations and their inverses (symmetric rels are self-inverses)
select * {
 
?x rdfs:isDefinedBy tgn:
  optional
{?x owl:inverseOf ?y}
}



HTH! Vladimir 

Karl Grossner

unread,
Jan 7, 2018, 11:50:39 AM1/7/18
to Getty Vocabularies as Linked Open Data
I re-opened this post because I need a listing of all placeTypes in AAT. I've got placeType identifiers for all records in TGN, but need to know names (literalForms) to do lookups, filter, reconciliation, etc. internally with my own relational representation of the TGN snapshot.

I tried downloading the AAT 'explicit' file and querying AATOut_2Terms.nt but don't see a ready way to filter for placeTypes.

I found this query (http://vocab.getty.edu/queries#TGN_Top_Place_Types) and figured if I remove the LIMIT 100 I'd get everything, but running it gets me a "The connection was reset" error page, whether I leave the LIMIT in or remove it.

I realize this may be some temporary issue with the server, but want to check. Many queries run from http://vocab.getty.edu/queries work but a few - including this one - don't.

Any tips for getting a complete placeType list, with display order would be a big help.

thanks
Karl

Richard Light

unread,
Jan 7, 2018, 7:31:16 PM1/7/18
to gettyv...@googlegroups.com

Karl,

If you keep it simple, the query should complete, e.g.:

select distinct ?type ?en {
     ?s gvp:placeTypePreferred ?type .
  ?type gvp:prefLabelGVP [xl:literalForm ?en].
} limit 1000

I get the first 200 terms of 591 in my results page.

Best wishes,

Richard

--
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 post to this group, send email to gettyv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gettyvocablod/7fd7cb3e-d853-4d16-875b-f7e9e78a87bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Richard Light

karlg

unread,
Jan 7, 2018, 7:39:34 PM1/7/18
to Richard Light, gettyv...@googlegroups.com

Yes, sorry Richard, I did realize I could get what I needed this way, and neglected to update the forum post

 

SELECT DISTINCT ?type ?en

{

      {

            select DISTINCT ?type ?en {

              ?s gvp:placeTypePreferred ?type .

              ?type gvp:prefLabelGVP [xl:literalForm ?en].

            }

      }

UNION

      {

            select DISTINCT ?type ?en {

              ?s gvp:placeTypeNonPreferred ?type .

              ?type gvp:prefLabelGVP [xl:literalForm ?en].

            }

      }

}

 

This got me what I think is all the labels in use for both placeTypes, whether preferred or not (975)

 

Slowly re-acquainting with sparql…

 

best, Karl

--
You received this message because you are subscribed to a topic in the Google Groups "Getty Vocabularies as Linked Open Data" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gettyvocablod/RooonIokVg0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gettyvocablo...@googlegroups.com.


To post to this group, send email to gettyv...@googlegroups.com.

vladimir...@ontotext.com

unread,
Jan 8, 2018, 2:34:11 AM1/8/18
to Getty Vocabularies as Linked Open Data
1. You could also just use gvp:placeType, which is union of Preferred and NonPreferred
2. Afraid the displayOrder of these won't be meaningful. It's only meaningful for sibling concepts but place types are not all siblings
3. Also there are some mistakes, eg "area (measurement)" is used instead of "area (geographic)". This will be fixed in next reload
4. Finally, the concept hierarchy of place types can be made a lot richer and improved. Getty is thinking about this but it's a long-term project. Discussing in https://jira.getty.edu/browse/ITSLOD-533 (a closed Jira). Eg
  • is "recreational area" a sub-concept of "park" or not? 
  • What's the relation of "nature reserve" to this?
  • tgn:2232483 Chaonia Landing Recreation Area currently has type "inhabited place"? According to Google that's a resort, marina, campground

To use place type as a profitable coreferencing feature, I think you need to match it to some other datasets.
  • AAT is about 1/3 matched to Wikidata. I can help to match all AAT place types to Wikidata (I've already matched some 3-4k concepts)
  • Geonames has a 2-level hierarchy ("<class>.<code>" eg "H.FLLS" is "waterfalls") of about 650 "feature codes". Of them 319 are mapped to Wikidata
  • Wikidata should have quite deep place type hierarchy, but I'm sure it needs to be cleaned up. Eg 2 years ago "Location" included things like "musical record" (through "storage") and "lab on a chip" (through "lab<facility")

vladimir...@ontotext.com

unread,
Jan 8, 2018, 2:44:04 AM1/8/18
to Getty Vocabularies as Linked Open Data
If you still need any help working with the dumps, please let me know.
AATOut_2Terms.ttl has the relations concept-term starting at line 2.8M, eg
aat:300403962 gvp:prefLabelGVP aat_term:1000641334-en .

To filter this file to only place types, you need to start with a list of place types (there's no marker "this AAT concept is used as a place type")
Reply all
Reply to author
Forward
0 new messages