How to find people in the SNAP graph

As you probably know, the pilot SNAP:DRGN project ended in December 2014, and although there are nearly seven hundred thousand person records visible through the public triplestore (SNAP 1SNAP 673934), we are currently lacking a user-friendly way to search within and find these records. (We’re working on this, as we’ll report here soon.) Most of the person records in SNAP so far are from LGPN, Trismegistos and PIR, but if you have a reference to PIR² M 436, say, or LGPN V.2 Θουκυδίδης 11, and want to find the SNAP URI with which to annotate your texts, there’s no obvious way to know that these are SNAP 9024 and 33624 respectively.

Of course, if you’re a Linked Data professional or developer and want to query our Sparql endpoint directly, you can do so by pointing your code at and adding parameters and queries as desired. You don’t have a problem, so probably weren’t desperate for our putative API in the first place (although the examle SPARQL queries below may still get you started).

You can also in principle query our triplestore using the Sparql test page at, with a few simple lines of Sparql to find the information you need. This is not a user-friendly interface for a historian, and I’m not pretending this is an acceptable substitute for a proper search interface, but if you’re desperate to find SNAP uris to add to your code, this might be a stop-gap to get you started.

Some example SPARQL queries that might be useful for you have been collected at the SNAP volunteers’ Github Wiki. I’ll walk you briefly through the specific query for finding the canonical SNAP uri for a person when you know the uri of the contributing dataset. (This is complicated only slightly by the fact that if two person records have been merged in SNAP, the canonical person id will be the new, merged uri, not the first one that was minted for the contributed record.) In the SPARQL search box, delete the query that is there already, and replace it with the code below, (obviously replace the LGPN id with whatever original id you are looking for).

PREFIX prov: <>
PREFIX dc: <>
{?snap2 dc:replaces ?snap1 .
?snap1 prov:wasDerivedFrom <>}
{ ?snap2 prov:wasDerivedFrom <>
MINUS { ?s dc:replaces ?snap2 } }

This query is basically saying, in sequence:

  1. find me the new SNAP id that replaced the first id that we minted from the contrubuted record
  2. *and* find me the id that we minted for the contributed record so long as it has not been replaced.

In either case, this should return one and only one, canonical identifier for the person you are looking for.

To find the original URI of a person in:

  1. LGPN: go to the LGPN search page and find the person you’re looking for (search by name or place etc.). Copy the full URI of the person: it will be shown as the id, e.g. V3a-31030, with a link to the URI in the form: (copy link address to get this full link).
  2. Trismegistos: go to Trismegistos People and find the person (not just name) you’re looking for. The person record will have a note of a “stable url (with PERS_ID)”, in the form (Note that this is a PERS_ID from the person page, *not* a REF_ID.) Prefix this with “http://” and add to the end the string “#this”, i.e.:
  3. PIR: search the PIR search mask for your person. Make a note of the person’s PIR identifier, e.g. “PIR² I 662”. Take the URI prefix “”, and add your PIR id, in lowercase, with hyphens instead of spaces, and the number padded to 4 digits, i.e. pir2-i-0662. This is not a resolvable URL, so it won’t be found on the web, but it will find the SNAP uri for you using the sparql query above.

Leave a Reply

Your email address will not be published. Required fields are marked *