You have to have some idea of what ontologies are being used and how they
are used. The SPARQL endpoint gives you a list of the prefixes to prepend,
but you still have to know what they are. The best way to learn about the
structure of the data is to browse around. There aren't many example
queries, and unfortunately, SPARQL requires knowledge of the underlying RDF
structure in order to query effectively. This thesaurus data isn't terribly
complex, so it's not nearly as complicated as putting together useful
SPARQL queries on CIDOC-CRM in the British Museum endpoint. As a tip, what
I learned from one of the Ontotext developers is that there's a luc:term
predicate you can employ for Lucene-based text searches. i.e.:
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?c ?label WHERE {
?c rdf:type gvp:Concept .
?c skos:prefLabel ?label .
?c skos:inScheme <http://vocab.getty.edu/aat/> .
?c luc:term "skyphos" .
FILTER langMatches(lang(?label), "en") .
}
ORDER BY ASC(?label)
LIMIT 25
As a tip, you might want to restrict with inScheme. The only terms in are
from AAT, but you'll need to distinguish once they've loaded TGN, ULAN, etc.
Now that the Getty vocabularies are officially public, I am hoping that
other software developers will create widgets to enhance description of
materials. I've already integrating AAT SPARQL lookups into EADitor (
http://eaditor.blogspot.com/2014/02/integrating-eaditor-with-getty-linked.html),
so hopefully other LAM collection management systems will begin linking
more directly to AAT, which will, in turn, make it easier to aggregate and
organize data (in DPLA, for example). I'm working on linked data projects
in the fields of numismatics and Greek pottery, and we've begun creating
concordances between the Getty, British Museum, and other thesauri.
Hopefully this opens the door to more widespread collaboration in cultural
heritage.
Ethan
On Fri, Feb 21, 2014 at 11:51 AM, Eric Lease Morgan <[log in to unmask]> wrote:
> > Today the Getty released the Art and Architecture Thesaurus as Linked
> Open Data [1].
>
> Releasing the Getty Thesaurus as linked data is very interesting, and
> after visiting the blog posting I discovered a SPARQL endpoint to the data.
> [2] Yet, I seem to always have problems exploring SPARQL endpoints without
> having an in-depth and thorough knowledge of the underlying ontologies. Is
> this just me, or am I missing something?
>
> For example, without knowing anything, I think I can submit a SPARQL query
> such as the following to just about any SPARQL endpoint to get an overview
> of the triple store’s ontologies:
>
> SELECT DISTINCT ?class
> WHERE { ?subject a ?class }
> ORDER BY ?class
>
> This query uses the SPARQL short-hand notation of “a” to denote the RDF
> predicate equal to rdf:typeOf, which I assume will be in just about every
> triple store. Correct? Applying this query to the Getty SPARQL endpoint
> returns a list of (hopefully) actionable URIs describing all the ontologies
> used in the triple store.
>
> I can submit the following SPARQL query to just about any triple store to
> get a list of all the predicates used in the triple store, but the query
> usually never returns; it probably creates a heck of a lot of work on the
> endpoint’s backend. Each one of these predicates ought to be described in
> greater detail in the actionable URIs from Query #1. Correct?
>
> SELECT DISTINCT ?property
> WHERE { ?subject ?property ?object }
> ORDER BY ?property
>
> Given these ontologies (classes) and properties (relationships), I ought
> to be able to navigate around the triple store discovering cool
> information, but I find the process to be very difficult. Here are a few
> queries:
>
> # list of concepts
> SELECT *
> WHERE { ?s a <http://vocab.getty.edu/ontology#Concept> }
>
> # all about the English phrase founding tools
> SELECT *
> WHERE { ?s ?p "founding tools"@en }
>
> # uri for founding tools
> SELECT ?uri
> WHERE { ?uri rdfs:label "founding tools"@en }
>
> I find this process to be painful. To what degree am I still to much a
> novice at SPARQL, and to what degree do I need to have an intimate
> knowledge of the ontologies before I can create meaningful queries? To what
> degree do more user-friendly front-ends need to be created? In order for
> URIs to replace literals in RDF, there will need to be much easier to use
> interfaces to triple stores. Correct? Like the need for a data dictionary
> and entity-relationship diagram in searching of relational databases vis
> SQL, to what degree do I really need to know and understand the supporting
> ontologies before I can make meaningful sense of a triple store?
>
> Put another way, is there some set of basic/rudimentary queries I can send
> to SPARQL endpoints, get results, and begin to drill down without really
> knowing the ontologies? I’m stymied in this regard.
>
>
> [1] announcement -
> http://blogs.getty.edu/iris/art-architecture-thesaurus-now-available-as-linked-open-data/
> [2] data home - http://vocab.getty.edu
>
> —
> Eric Lease Morgan
> University of Notre Dame
>
|