Skip to content

Instantly share code, notes, and snippets.

@edsu
Created April 28, 2010 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/382213 to your computer and use it in GitHub Desktop.
Save edsu/382213 to your computer and use it in GitHub Desktop.
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX lcsh: <http://id.loc.gov/authorities#>
SELECT ?c1 ?c2
WHERE {
?c1 skos:inScheme ?cs1 ;
skos:prefLabel ?l1 ;
skos:broader ?c2 .
?c2 skos:prefLabel ?l2 ;
skos:inScheme ?cs2 .
FILTER(?l1 = ?l2
&& ?cs1 != ?cs2
&& ?cs1 != lcsh:conceptScheme
&& ?cs2 != lcsh:conceptScheme)
}
4s-query lcsh --softlimit 400000 < lcsh.sparql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment