Friday, January 22, 2010

Referring to People and Places

Another title for this post could be "How can I achieve something by doing nothing?"

Back in 2006 I published the article 'A Box Mirror Made from Two Antinous Medallions of Smyrna.' American Journal of Numismatics Second Series 18 (2006), 63-74. It contains the following sentences:
The reverse type on this piece is one of four images — showing either the female panther on this piece, a bull, a sheep, or a ship’s prow — that appear on a series of medallions struck at Smyrna in honor of Antinous and naming Polemon as issuer. These two individuals are both historical figures and their biographical information provides the framework for dating the issue. Antinous was the companion of the emperor Hadrian who drowned in the Nile in late AD 130.
I am currently thinking about how to represent links from the "named entities" embedded within texts such as this to well-known identifiers for those concepts. That's what I want to achieve. The "doing nothing" part of my alternate title is an off-hand way of indicating that I want to make as few choices as possible. To again rephrase, the bottom line is that I'm hoping to use pre-existing standards.

BTW, pictures of the mirror are at http://numismatics.org/collection/2005.19.1.

In terms of well-known identifiers, here's the "low hanging fruit" that I see in the sample text:We could get into dates and abstract concepts such as "emperor" but I'll save that for later.

You'll note that I'm using the English Wikipedia for most of my identifiers and Pleiades for Smyrna. There is a Wikipedia article for that ancient site, but I do want to situate myself within the discipline of ancient geography. I think using the Pleiades reference meets that goal. On a slightly different topic, I was tempted to use dbpedia references – as in http://dbpedia.org/resource/Polemon_of_Laodicea – but think it's probably better practice to give the Wiki URI and let harvestors, etc. derive the dbpedia URI if they want to. Is it a disadvantage to tie the URI to a particular language?

Moving along... how to embed these references in the text? That does require an initial choice: RDFa embedded in xhtml. Here's a possible snippet that links an implicit identity with the relevant unambiguous identifier:
<span id="id7474" about="#id7474" typeof="foaf:Person" rel="owl:sameAs" resource="http://dbpedia.org/page/Polemon_of_Laodicea">Polemon</span>
With this markup I am trying to say, "the characters 'Polemon' refer to a person and that person is the same as the person represented by the URI 'http://dbpedia.org/page/Polemon_of_Laodicea'."

Why do I think I've achieved that? If I point an RDF parser – I use rapper – at this text, I get the following triples:
<http:/example.org/AJN2006-Heath.html#id7474>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .

<http:/example.org/AJN2006-Heath.html#id7474>
<http://www.w3.org/1999/xhtml/vocab#cite>
<http://en.wikipedia.org/wiki/Polemon_of_Laodicea> .

<http:/example.org/AJN2006-Heath.html#id7474>
<http ://www.w3.org/2002/07/owl#sameAs>
<http://en.wikipedia.org/wiki/Polemon_of_Laodicea> .


I think this represents progress towards using a well-known standard that allows a third-party tool to extract the semantic meaning in my text. Expanding the markup I'm using, here's the whole sample text with embedded RDF:
The reverse type on this piece is one of four images — showing either the female panther on this piece, a bull, a sheep, or a ship’s prow — that appear on a series of medallions struck at <span id="id128979" about="#id128979" typeof="geonames:Feature nm:mint" rel="skos:sameAs cite" resource="http://pleiades.stoa.org/places/550771">Smyrna</span> in honor of <span id="id49178" about="#id49178" typeof="foaf:Person" rel="skos:sameAs cite" resource="http://en.wikipedia.org/wiki/Antinous">Antinous</span> and naming <span id="id7474" about="#id7474" typeof="foaf:Person" rel="cite skos:sameAs" resource="http://en.wikipedia.org/wiki/Polemon_of_Laodicea">Polemon</span> as issuer. These two individuals are both historical figures and their biographical information provides the framework for dating the issue. Antinous was the companion of the emperor <span id="id876873" about="#id876873" typeof="foaf:Person" rel="skos:sameAs cite" resource="http://en.wikipedia.org/en/Hadrian">Hadrian</span> who drowned in the <span id="id5726" about="#id5726" typeof="geoname:Feature" rel="skos:sameAs cite" resource="http://en.wikipedia.org/wiki/Nile">Nile</span> in late AD 130.


Which produces the following RDF:
<http:/example.org/AJN2006-Heath.html#id128979>
a nm:mint, geonames:Feature ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://pleiades.stoa.org/places/550771> ;
skos:sameAs <http://pleiades.stoa.org/places/550771> .

<http:/example.org/AJN2006-Heath.html#id49178>
a foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/wiki/Antinous> ;
skos:sameAs <http://en.wikipedia.org/wiki/Antinous> .

<http:/example.org/AJN2006-Heath.html#id7474>
a foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/wiki/Polemon_of_Laodicea> ;
skos:sameAs <http://en.wikipedia.org/wiki/Polemon_of_Laodicea> .

<http:/example.org/AJN2006-Heath.html#id876873>
a foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/en/Hadrian> ;
skos:sameAs <http://en.wikipedia.org/en/Hadrian> .

<http:/example.org/AJN2006-Heath.html#id5726>
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/wiki/Nile> ;
skos:sameAs <http://en.wikipedia.org/wiki/Nile> .


By way of a few observations, note that I type "Smyrna" – here id128979 - as a mint using the URI http://nomisma.org/id/mint, which is a reference to an incipient numismatic vocabulary. I don't type Hadrian as a Roman emperor. 'Smyrna' can be used in many ways so I want to be clear that I'm referring to it as a mint (in the broad numismatic sense). Hadrian's role as emperor is explicitly stated in the Wiki article and in its dbpedia equivalent. I don't think I need to repeat that here.

I'm also adding 'cite' to the rel attributes. 'cite' is one of the W3 sponsored relationships and I like how generic it is but also want to use the more specific 'skos:sameAs'.

This post is not a finished product and I don't mean to suggest that the above is the best way to achieve my goal. I welcome comments along the lines of "You should be using pre-existing standard http://...." or "What you suggest is sort of (barely?) OK but here's an improvement...". Is there a better RDFa pattern?

1 comment:

Sebastian Heath said...

Anybody who reads closely will see that my first snippet does use dbpedia URIs. I switched mid-course but forgot to redo that section. My bad.