Skip to main content
Back

University of Moratuwa Releases SiDiaC-v.2.0, the Biggest Historical Sinhala Corpus Ever

A new Sinhala diachronic corpus expands historical text coverage to 241k words across 185 works spanning the 5th to 20th century.

Pro

  • SiDiaC-v.2.0 is now the largest Sinhala diachronic corpus, with 241k words across 185 literary works.
  • A date-annotated subset of 59 documents (67k words) enables century-level semantic analysis from the 13th to 20th century.
  • Texts were digitised from the National Library of Sri Lanka using Google Document AI OCR then manually cleaned character by character.
  • New special tokens include <eos> for sentence boundaries and <psi> for preserving poetic rhyme splits.
  • Genre skews heavily religious (86) and poetic (54), reflecting the Buddhist and Sanskrit kavya roots of Sinhala literature.
  • Corpus and metadata are open on GitHub, though no POS tagging is provided.

Sinhala, spoken by roughly 16 million people in Sri Lanka, sits firmly in the low-resource tier of NLP. A team from the University of Moratuwa and the Informatics Institute of Technology has just released the largest historical text collection ever built for the language, and the way they cleaned it up highlights how much heavy lifting still goes into low-resource corpus work.

SiDiaC-v.2.0 is a diachronic corpus, meaning it is designed to study how a language changes over time. It covers a period from 1800 CE to 1955 CE in terms of publication dates, and a historical span from the 5th to the 20th century CE in terms of written dates. The full corpus contains 241k words across 185 literary works that underwent thorough filtering, preprocessing, and copyright compliance checks, followed by extensive post-processing, with a subset of 59 documents totalling 70k words annotated based on their written dates.

Why the previous version fell short

The earlier SiDiaC-v.1.0 was a first pass with 58k tokens across 46 books. The new work catalogs a long list of problems the authors found when they went back through it: OCR errors that inserted or deleted characters, chunks of Pali and Sanskrit written in Sinhala script mixed into supposedly Sinhala texts, page titles and content tables that leaked into the text stream, and two-column pages that the OCR engine flattened incorrectly.

There was also a subtler issue with commentary books. Traditional Sinhala texts often bundle an original work with a much later commentary in the same volume, so a single file could span two very different time periods while being tagged with only one date. The old dating criteria were also strict enough that out of 233 identified books only 46 made it into v.1.0 after filtering.

Diagram comparing OCR character-level errors in SiDiaC v1.0 and v2.0

How the new pipeline works

The authors sourced scanned books from the National Library of Sri Lanka and ran them through Google Document AI OCR, which they found handled historical Sinhala better than alternatives thanks to its text modernisation and morpheme segmentation. Then came the labor-intensive part: manual, character-by-character review by native Sinhala speakers.

The main changes over v.1.0:

  • Looser date filtering. Following COHA's practice, they used publication dates and author lifespans instead of demanding a verified composition date for every text, expanding coverage from 46 to 185 works.
  • Code-mixing removal. Because no language-ID model can currently distinguish Sinhala, Pali, and Sanskrit written in the Sinhala script, the authors manually stripped 18 non-Sinhala books and cleaned mixed passages inside the rest.
  • Special tokens. An <eos> marker delineates sentences (Sinhala's only native punctuation, the kundaliya, marks whole sections rather than sentences), and a new <psi> tag marks where poets split words to preserve rhyme without losing the original layout.
  • Multi-column and table fixes. Two-column pages are now serialized top-to-bottom in a single column, and decorative content tables were removed rather than reformatted with spaces.
Flowchart showing poetry suffix handling with psi tokens

What is inside

Each book comes with a metadata JSON file including Sinhala and romanised titles, author, genre, issued date, written date, and average OCR confidence. Genre classification runs in two layers: a binary Fiction / Non-Fiction split, and a finer secondary label. The breakdown skews heavily toward religious and poetic texts, reflecting the close ties between Sinhala literary tradition and Theravada Buddhism.

Secondary genreBooks
Religious86
Poetry54
History18
Language17
Medical5
Unclassified5

A first look at semantic change

The paper demonstrates the corpus with a per-century Bag-of-Words study on the date-filtered subset. Using a plus-or-minus 10 word window, the authors track the neighbors of polysemous terms across the 13th to 20th centuries. For the word meaning "four," senses tied to religious cosmology (references to the four hells) show up mainly in the 13th and 15th centuries, while its use as a numeral for mathematics and directions persists throughout. For the word meaning "great" or "powerful," senses of physical size dominate the 13th through 15th centuries, disappear, and then briefly re-emerge in the 20th.

Availability and honest limits

Everything is on GitHub, including the text files, metadata, and the full non-filtered list of books. Two important caveats: only 59 of the 185 works have verified written dates, so anyone doing tight diachronic analysis will be working with the smaller subset. And unlike Latin, Icelandic, or English historical corpora, there is no POS tagging or lexical annotation, because accurate part-of-speech taggers for historical Sinhala simply do not exist yet. That leaves an obvious next step for anyone looking to build tools on top of this data.