Code & Text
I am a Digital Humanities Fellow at Princeton's Center for Digital Humanities and a research assistant in the digital humanities. Beyond that, I script, engineer, and solve — and create — problems for their own sake: I am a tinkerer and a digital do-it-yourself enthusiast.
I am currently at work on two research projects.
Fengliu and the ninth century
The first grows directly out of my doctoral dissertation, which reads the romantic narratives of the late Tang dynasty as sites of class tension. While working through these stories, my interest was caught by a tremendously elusive compound: fengliu 風流. Usually translated as "panache" or "sprezzatura", it behaved through the late Tang as a floating signifier — a word with no single referent.
Yet fengliu has a long and rich history reaching back to the Han dynasty, and across the centuries it took on radically opposed meanings. Having built, cleaned, and trained a corpus of texts spanning the Han through the early Tang, I am applying a range of text-analysis techniques specific to premodern Chinese, with the ultimate goal of tracing the semantic shifts of this compound. The project is nearing its final stages; I will release the code on my GitHub before long, once it has had a thorough tidying.
The material signature of woodblock prints
The second is a collaboration with the Department of East Asian Studies at Princeton. It sets out to recognise the material signature of woodblock prints, and through it to trace their movement across regions and centuries. My part is to build and label corpora of woodblock scans and to train models that detect cracks, cuts, and other marks left by the block itself.
Personal projects
I also write code away from research, for the pleasure of building my own software. Two projects I am fond of:
- Vocabolario — a fast, lightweight desktop dictionary
with a GTK 3 interface, written in Python over an SQLite backend. Entries
are HTML, styled per-dictionary with CSS and JavaScript injections; the
interface is theme-aware and driven by config files, and the whole thing
ships from CLI prototype to a Debian
.debpackage. I built it because I badly needed a good dictionary to write my dissertation.
Python · SQLite · GTK 3 · WebKit2 - NewsScraper — an automated pipeline that logs in to a
handful of Italian newspapers, downloads the daily editions as PDF,
compresses them by up to 60%, and emails them to a list of recipients.
Credentials are Fernet-encrypted and stored apart from the key; it keeps a
timestamped log and a daily archive, and runs from a Raspberry Pi on cron.
It saves me twenty minutes every morning.
Python · Selenium · Fernet · Ghostscript - Evim a general-purpose PDF reader with an
annotation layer, written from scratch in Python with PyQt — a
scholar's tool, built because I spend my days reading PDFs and wanted one that
behaved the way I think. What began as a modest prototype turned into a long
education in everything that stands between "it renders" and "it renders
smoothly." Getting zoom and scroll to feel fluid at high magnification meant
walking straight into Python's harder corners: the Global Interpreter Lock (GIL),
which forced the renderer out of a thread and into a separate process; the cost
of moving rendered pixels across that process boundary, solved with shared
memory and a double-buffer handshake; and, at extreme zoom, a tiling system that
renders each page as a grid of fixed-size patches so the interface never blocks
behind a single giant render. Along the way I fought — and eventually won — a
small war with Python's
resource_trackerover the lifecycle of those shared-memory blocks. It is still a work in progress, and I am learning as I go, but at normal zoom it already outpaces the standard Linux PDF readers, and at extreme zoom it holds its own against Preview and Acrobat. I intend to write the whole thing up properly before long.
Python · PyQt · PyMuPDF