Posted on by & filed under digitization, libraries, tools.

I was pleased to be able to assist with the Corpus Toneelkritiek Interbellum project, which allows reading, browsing and searching of early 20th-century Dutch theater reviews. I can’t read Dutch, but Google’s automated translation tells me that the review of Hamlet mentions a “long modern clown,” which sounds disturbing enough that I’ll leave the actual reading to someone else.

The source documents are encoded in TEI XML and rendered to the browser using Python and lxml, three of my favorite technologies.

There are a few take-aways from this project that might benefit anyone working in a similar area and scale:

  • Use a standard encoding format (in this case TEI, but choose an appropriate one based on the source content)
  • Use a modern programming language, even in a humanities context (e.g. Python)
  • Use modern XML parsing tools (e.g. lxml + XPath + XSLT)

The key advantage of libraries such as lxml in publishing and digitization projects is that it allows the developer to freely mix XML-native languages like XPath and XSLT with the expressive, procedural programming style of Python. I’m still amazed by how many people are “parsing” XML using regular expressions (or worse), or using plain CGI/Perl scripts to serve up content. There are easier ways!

“Free” doesn’t have to mean primitive. In fact I would argue that projects like Pinax can jump-start library or digital archive sites into the 21st century with less work than a grad student will spend crafting a bespoke Perl script.

Congratulations to Thomas Crombez and his team!

Tags: clowns, digitization, dutch, lxml, Python, tei, xpath, xslt,

One Response to “TEI + Python + lxml + Dutch = Corpus Toneelkritiek Interbellum”

  1. James Tauber

    As both the creator of Pinax and a linguist with a strong corpus focus, I’m very interesting in how Pinax can help digital library projects!