CuneiML: A Cuneiform Dataset for Machine Learning

Danlu Chen, Aditi Agarwal, Taylor Berg-Kirkpatrick, Jacobo MyerstonJournal of Open Humanities Data 2023 · DOI

Abstract

The cuneiform writing system holds a vast reservoir of ancient literature, encompassing over 3000 years of history. Originating around the mid-fourth millennium BCE and enduring until the late first millennium BCE, cuneiform writing spans various genres such as administrative, legal, medical, and scientific documents, among others. This article introduces a curated dataset, CuneiML, featuring 38,947 high-resolution 2D photos of Sumerian and Akkadian cuneiform tablets, accompanied by their cuneiform Unicode transcriptions, transliterations, lineart, and metadata. This dataset aims to support the development of machine learning tools for processing and analyzing Sumerian and Akkadian cuneiform artifacts—e.g. for automatically classifying genre, provenance, or period from unannotated tablet images. Thus, CuneiML is designed with consistency of format as a primary concern. Specifically, CuneiML is a result of meticulously preprocessing, segmenting, filtering, and re-transliterating data that is available online in the Cuneiform Digital Library Initiative (CDLI) collection.

Introduction

Cuneiform is one of the world's oldest writing systems, documenting three millennia of human history across legal, medical, and administrative texts. While digital archives like the Cuneiform Digital Library Initiative (CDLI) have done the monumental work of digitizing these artifacts, the data is often not "AI-ready."

Existing archives face three major hurdles for machine learning:

  1. Composite Images: A single photo often contains six different views (front, back, and sides) of a tablet, which confuses standard image classifiers.
  2. Inconsistent Quality: Images vary wildly in resolution, lighting, and color.
  3. The Transliteration Gap: Most digital text is stored as Latin-script transliterations (e.g., ti-amtu), not the original cuneiform signs. This introduces human bias, as scholars often choose a transliteration based on what they expect the tablet to say given its suspected time period.

Methodology

The authors developed a pipeline to transform the CDLI's raw "scholar-facing" data into "machine-facing" data through three primary steps:

Automated Segmentation

To solve the composite image problem, the team used three computer vision techniques—Connected Component segmentation, Watershed segmentation, and the state-of-the-art SegmentAnything (SAM) model—to isolate the "major face" of each tablet. They only kept images where these three methods agreed on the bounding box (90% overlap), ensuring high data quality.

Example of a major face cutout extracted via the automated segmentation pipeline.

De-transliteration and Filtering

The team converted Latin-based transliterations back into cuneiform Unicode. This process involved handling complex rules for uncertainty, breakage, and compound words, effectively "re-encoding" the tablets into their original visual logic. Furthermore, they strictly removed non-tablet artifacts (like cones or cylinders), low-resolution images (<100x100px), and black-and-white photos to maintain a consistent, high-quality training set.

The CuneiML Dataset

The primary contribution is CuneiML, a curated dataset of 38,947 tablets. It includes 2D photographs, extracted major face cutouts, lineart (hand-drawings), Latin transliterations, and cuneiform Unicode transcriptions. While existing 3D datasets like HeiCuBeDa are limited to roughly 2,000 tablets from four specific periods, CuneiML is 20 times larger and covers nearly the entire chronological history of cuneiform.

CuneiML provides multi-modal data including Latin transliterations and major face image cutouts.

Experimental Results

The authors ran baseline experiments using ResNet-101 for images and LSTMs for text to predict the period, provenance (origin), and genre of the tablets. Interestingly, the image-based models outperformed text-based models across the board, suggesting that physical characteristics—clay texture, wedge shape, and layout—carry significant signals that text alone might miss.

Task Image Accuracy (Major Face) Unicode Accuracy
Time Period 97.66% 90.50%
Genre 89.00% 81.50%
Provenience 85.72% 61.71%

Discussion and Limitations

By providing Unicode transcriptions rather than just Latin transliterations, CuneiML allows models to learn from the signs themselves, avoiding "circular reasoning" where a model might simply learn a modern scholar's bias. However, the dataset remains highly imbalanced; for example, the "Administrative" genre has over 34,000 examples, while "Prayer" or "Incantation" have fewer than 20. Additionally, 2D photos lose the depth information of wedge marks, which is vital for some paleographic analyses.

Future work will likely focus on using this data for automatic transcription (OCR)—turning a raw photo of a tablet directly into Unicode text—a long-sought goal for the field of Assyriology.

Summary updated

Abstract

The cuneiform writing system holds a vast reservoir of ancient literature, encompassing over 3000 years of history. Originating around the mid-fourth millennium BCE and enduring until the late first millennium BCE, cuneiform writing spans various genres such as administrative, legal, medical, and scientific documents, among others. This article introduces a curated dataset, CuneiML, featuring 38,947 high-resolution 2D photos of Sumerian and Akkadian cuneiform tablets, accompanied by their cuneiform Unicode transcriptions, transliterations, lineart, and metadata. This dataset aims to support the development of machine learning tools for processing and analyzing Sumerian and Akkadian cuneiform artifacts &ndash; e.g. for automatically classifying genre, provenance, or period from unannotated tablet images. Thus, CuneiML is designed with consistency of format as a primary concern. Specifically, CuneiML is a result of meticulously preprocessing, segmenting, filtering, and re-transliterating data that is available online in the Cuneiform Digital Library Initiative (CDLI) collection.
BibTeX
@article{chen2023cuneiml,
  author = {Danlu Chen and Aditi Agarwal and Taylor Berg-Kirkpatrick and Jacobo Myerston},
  title = {{CuneiML: A Cuneiform Dataset for Machine Learning}},
  journal = {Journal of Open Humanities Data},
  year = {2023},
  doi = {10.5334/johd.151},
}
Figure