Research

ThinaiKG — the research behind this site

sangamtamil.com began as an M.Tech dissertation at BITS Pilani: teach a machine to tell which of the five landscapes an akam poem belongs to, using the same cues a scholar uses — the flowers, birds, trades and places named in the verse — and turn what it learns into a knowledge graph anyone can browse. This page summarises the work; the full report is embedded below.

1,891akam verses classified into five thinai
0.82macro F1 (82.3% accuracy) on a 500-verse ground truth
417validated karupporul entities, from 176 seeds
83%of machine-proposed entities accepted by the reviewer
2,313graph nodes, 21,950 edges, exported as OWL, GraphML and JSON

These figures are those of the dissertation as examined in February 2026, and describe the akam corpus the classifier was built on. The site has grown since: the knowledge graph now indexes 1,483 entities across the Sangam anthologies, and the edition covers 47 texts from Tolkappiyam to the epics. Nothing on this page is updated to flatter the report.

The problem

An akam poem never names its landscape. A glory lily, a hill and the god Murugan say kurinji; a seagull and salt-pans say neytal. That code lives in Tolkappiyam and in readers' heads, not in any machine-readable form — and general-purpose Tamil language tools, trained on news and social media, fail on two-thousand-year-old vocabulary.

The turning point

The first classifier was the textbook one: TF-IDF over ten thousand word n-grams and a kernel SVM. It managed a macro F1 of 0.52, and the smallest class, kurinji, collapsed to 0.32. Dropping the "confusing" marutham class did not help — the problem was the features, not a class.

The fix came from literary theory. Tolkappiyam already says what defines a landscape: its karupporul, the flora, fauna, land, occupations and food native to it. Keeping only those entity words in each verse and discarding everything else aligned the feature space with the way a scholar reads. With 145 curated entities the F1 rose to 0.68; with iterative expansion it reached 0.82. As a bonus, every decision became explainable: it can be traced to named cultural entities.

Why not a transformer?

IndicBERT v2 was fine-tuned on the same task in four configurations, each taking about two days on a laptop GPU. The best reached 58.6%. With 1,891 verses there is not enough data to re-teach a twelve-layer encoder an archaic vocabulary that its tokenizer breaks into meaningless fragments, and a transformer's weights offer none of the entity-discovery value the SVM's weights do. The dissertation kept the entity-based SVM and recorded BERT as future work.

Entity-feature SVM82.3%
IndicBERT + KG features58.6%
Frozen BERT + linear head53.6%
TF-IDF baseline (F1)0.52

The pipeline

Five layers, each improvable on its own. The loop in the middle is the heart of it: the classifier proposes new entities, a human accepts or rejects them, the lexicon grows, the classifier is retrained.

1

Acquire and clean

All seven akam texts scraped from Project Madurai — Ainkurunuru, Kuruntokai, Natrinai, Akananuru, Kalittokai, and the two akam idylls Kurinjippattu and Mullaippattu split into verses. Metadata, numbering and commentary stripped; Unicode normalised. No lemmatisation: the inflected poetic forms carry the signal.

2

Ground truth and seeds

500 verses hand-verified, 100 per thinai, for a balanced training and test set. A 176-term seed lexicon of citation-verified flora, fauna, occupations and foods curated from scholarly sources.

3

Classify

Five one-vs-rest linear SVMs, one per thinai, over TF-IDF of entity tokens only. A verse goes to the thinai with the highest decision score; a prediction is trusted for the next step only when score and confidence both clear a threshold.

4

Discover entities, with a human in the loop

On verses predicted with confidence above 0.95, terms are scored by SVM coefficient × summed TF-IDF; those above 0.7 and seen at least three times are proposed. A reviewer checks each for cultural relevance, correct thinai and being a real word rather than a suffix or fragment. Sixteen lexicon versions later: 417 entities, 83% acceptance.

5

Build the graph, publish

A lightweight OWL ontology — Thinai, Verse, Entity, Category — populated from the corpus, every claim traceable to the verse it came from. Exported, then rendered as this website with its knowledge-graph explorer and the Thinai Quest game.

Results by landscape

On the balanced 500-verse ground truth. The error profile matches the poetry: the seashore is unmistakable; the wasteland, which Tolkappiyam treats as any landscape withered by drought, borrows everyone else's symbols.

ThinaiPrecisionRecallF1
Kurinji குறிஞ்சி0.870.820.84
Mullai முல்லை0.840.760.80
Marutham மருதம்0.830.770.80
Neytal நெய்தல்0.880.870.87
Palai பாலை0.740.850.79
Overall0.830.810.82

Reading the table

Neytal is easiest: sea, fishermen, boats and marine life are distinct, consistent cues. Kurinji benefits from its characteristic mountain flora, fauna and terrain. Marutham and mullai share farmland-and-pasture imagery yet stay balanced at 0.80. Palai is hardest — recall is high at 0.85 but precision drops to 0.74, because the wasteland shares its symbols with the landscapes it withers.

Verses per thinai in the full corpus: palai 27.9%, kurinji 27.0%, neytal 18.1%, marutham 13.6%, mullai 13.4%. The natural imbalance was kept, and the two minority classes drove the targeted entity expansions.

The knowledge graph

Deliberately minimal: four classes, four relationships, and a rule that an entity enters the graph only on double confirmation — a high-confidence thinai classification and a significant SVM weight.

Ontology

Classes

  • Thinai — one of the five landscapes.
  • Verse — a poem with identifier and Tamil text; the container in which entities occur.
  • Entity — a culturally significant term with Tamil name, English gloss and, where there is one, a picture.
  • Category — flora, fauna, occupation, land, food, and so on.

Relationships

  • APPEARS_IN — Entity → Verse
  • BELONGS_TO — Verse → Thinai
  • HAS_CATEGORY — Entity → Category
  • CHARACTERIZES — Entity → Thinai, derived when an entity recurs in high-confidence verses of a landscape
Graph metricValue
Thinai nodes5
Entity nodes417
Verse nodes1,891
Verse → Thinai edges1,891
Entity → Thinai edges885
Entity → Verse edges19,174
Density0.0082
Average degree18.98
Maximum degree1,117

What the project learned

Domain theory is the best feature engineer

A two-thousand-year-old grammar outperformed ten thousand statistical n-grams. When a corpus is symbolic, encode the symbols.

Negative results steer

Removing a class, cleaning too aggressively (versions 5–9 fell to about 78%), and the BERT runs each closed a door and pointed to the right one.

Quality over quantity

A filtered set of 237 entities matched a 1,000-term set within 1%. The signal lives in a small core of concrete entities.

Keep the human in the loop, and version everything

Sixteen lexicon versions with per-version metadata and a changelog made every gain reproducible and every regression explainable.

Interpretability pays twice

The SVM's weights were both the classifier and the entity-discovery engine. A black box would have delivered neither the graph nor the 83% acceptance rate.

Ship it

Publishing the site and the game turned a dissertation into a resource students, scholars and non-Tamil speakers can actually use.

The full report

Twenty-one pages compiled in September 2026 from the dissertation record (final report version 7.0, January 2026). Chapters 1–3 set out the problem, the literature and the design; 4–6 the data, method and results; 7–8 the graph and this platform; 9–10 the journey, limitations and future work.

Title
ThinaiKG — A Knowledge Graph for preserving the intangible cultural heritage of Sangam Tamil literature
Programme
M.Tech in Artificial Intelligence & Machine Learning, BITS Pilani Work Integrated Learning Programme
Student
Simon Peter J (2023AC05196)
Supervisor
Srilakshmi Dorairajulu, Director, LSI India R&D Pvt. Ltd. (Broadcom), Bangalore
Additional examiner
Dr. P. Velvizhy, Assistant Professor
Faculty mentor
Parthasarathy P D
Duration
16 weeks, 1 October 2025 – 28 January 2026; final viva February 2026
Keywords
Knowledge graph · NLP · Ontology · Sangam · Tamil · Digital humanities

Your browser does not display PDFs inline.

Open the report

Download the PDF (11 MB) · Open in a new tab

From dissertation to edition

The report's future-work list asked for broader coverage and multilingual access. That is what this site became after the viva: every Sangam text with its colophons, Tolkappiyam, Thirukkural, the eighteen minor works and the epics, with public-domain English translations that name their translators, and the knowledge graph opened up to every landscape and every verse.