Tuesday, March 30, 2010

Of iPads, ePub and Troy

Apple's iPad will start arriving in customer's hands on April 3rd, and at least some of them will end up in the hands of Mediterranean archaeologists. That sounds like an opportunity so I've spent the last few days playing around with ePub software.

I can quickly say that all the desktop readers that I've seen are terrible. Adobe Digital Editions? Ugly. The Stanza desktop version? Ugly and doesn't show my images. Lovely Reader looks OK but does a bad job of laying out text and image.

The Stanza reader on the iPhone is decent and that's what I've been testing against.

The most useful application is far-and-away Calibre. Once I figured out to install the command-line tools, converting xhtml to epub is a single step. There are lots of options to play with, but the basic idea is simple.

So... I spent a little time simplifying the xslt stylesheets that convert the database for Greek, Roman and Byzantine Pottery at Ilion into xhtml. Then I pointed Calibre at the resulting file. You can download an early version of the results here. Don't expect too much. No TOC, bad spacing so it's hard to distinguish catalog entries, other varied problems. But all will improve over time.

To get this on an iPhone you need to load Stanza on to it. Then "Get Books" -> "Downloads" -> "Edit" -> "Download Book from URL". Typing a long URL is a pain on the iPhone so enter this: http://bit.ly/troyepub.

Again, it's super-preliminary so keep an eye out for improvements. And if anybody gets this onto an iPad, let me know how it looks. I'll try it myself soon enough but not right on April 3rd.

Tuesday, March 23, 2010

SPARQL Based Navigation of RDFa Encoded Named Entities

This is a quick heads up on a new feature at Nomisma.org, the ANS-hosted project assigning stable URIs to numismatic concepts.

At http://nomisma.org/id/lyttus you'll find a very brief representation of the ancient site of Lyttus in Crete. It links to the relevant Wikipedia article and Barrington Atlas ID so it should be unambiguous which site we mean and it should be easy to find out further information. As a convenience, and to make it easy to put a dot on the map, the page also has latlong info.

This post is about the list of URIs prefaced by the text "The following Nomisma IDs refer to this ID:". If you click on http://nomisma.org/id/igch0151, you'll get a description of a hoard of coins as published in Inventory of Greek Coin Hoards.

Nomisma.org uses RDFa so the markup of the hoard includes the snippet: <span rel="nm:mint" resource="lyttus">Lyttus: 1 dr.</span> . You can click on "Show Markup in Page" to see this.

All the descriptions of numismatic concepts are collected in a single RDFa file at http://nomisma.org/nomisma.org.xml and as RDF-XML at http://nomisma.org/nomisma.org.rdf. That one snippet from igch0151 will produce the triple:
<http://nomisma.org/id/ich0151>
 <http://nomisma.org/id/mint>
 <http://nomisma.org/id/lyttus>

So... visiting http://nomisma.org/id/lyttus queries http://nomisma.org.rdf with a SPARQL statement of the form ' SELECT ?id WHERE { ?id ?refersto <http://nomisma.org/id/lyttus> }'. This just binds "?id" to a list of the ids that refer to Lyttus.

Bottom line: Simple markup achieves meaningful results using pre-existing standards. I wrote none of the tools to make this work. It will be fun when I get around to turning that list of IDs into a map, which will be simple using the Google Maps API. Then we will have a geographic front-end to "SPARQL-based Navigation of RDFa Encoded Named Entities".

Note: all of the RDFa patterns are in the process of being defined and the entries are in the process of being markedup. I.e., this is all in alpha stage.

Tuesday, March 16, 2010

The Relative Value of Oil and Wine in the Talmud

For the last week I've been following Daf Yomi, the 7 year cycle by which Orthodox Jews read the entire Talmud. It's part of my "Echoes of Late Antiquity" hobby and so far I'm having fun. Take this translated quote from Sanhedrin 31a
If one witness attests [the loan of] a barrel of wine, and the other, of a barrel of oil: — such a case happened, and it was brought before R. Ammi, who ordered him [the defendant] to repay a barrel of
wine out of [the value of] the barrel of oil.
So a "barrel" of oil is worth more than the same of wine. That's nice to know. Of course, I'm relying on the translation from halakhah.com and that's always a worry.

FWIW, the legal principle here is that you need two witnesses. Since the value of the oil is higher, there are only two witnesses to the loan of the value of the barrel of wine.