completed Jan 2024 - Jul 2025

Vehicle Prediction in Tamil Similes with POS-Aware Transformer Models

#NLP #Simile Generation #Masked Language Modeling #Tamil #Low-Resource Languages #Dataset
Vehicle Prediction in Tamil Similes with POS-Aware Transformer Models

Overview

A simile is a figure of speech that explicitly compares two different things through a shared property, typically using comparators such as "like" or "as". Computational simile processing has advanced mainly in high-resource languages such as English and Chinese, while Tamil, despite its rich use of similes in poetry, literature and song lyrics, has lacked both annotated resources and generation tools.

This project addresses that gap in two stages. First, it introduces the Tamil Simile Dataset (TSD), a manually annotated corpus of 1,520 simile sentences drawn from Tamil Wikisource and song lyrics, with every sentence labelled for its TENOR, VEHICLE and CONTEXT. Second, it frames simile surface realization as a masked language modelling task: given the tenor and context, the model predicts the masked vehicle. To overcome the small dataset size, the team developed pattern-based data augmentation that exploits Tamil's flexible word order, a Two-Stage Fine-Tuning (TSFT) strategy that first adapts the model to a Tamil literary and song-lyrics corpus before task tuning, and a novel gated fusion mechanism that injects Part-of-Speech (POS) embeddings from the ThamizhiPOSt tagger into the transformer. The best model, TamilBERT TSFT+POS, was benchmarked against GPT-4o and GPT-4 and deployed in two public web applications.

Motivation & Objectives

Simile generation in Tamil, a low-resource language, remained largely untapped despite its potential in machine translation, conversational systems, creative writing and cross-cultural communication. This research is the first to address simile generation in Tamil and aims to establish a foundational approach that can be extended to other low-resource languages. The work is organised around four objectives:

Annotated Simile Corpus – Build a Tamil simile corpus annotated with tenor, vehicle and context, targeting high inter-annotator agreement measured by Krippendorff's alpha.

Simile Surface Realization – Design a model that generates suitable vehicles for a given tenor and context, with a target of at least 40% Hits@10.

Simile Sentence Generation – Explore large language models (LLaMA-3.2-1B, Tamil-LLaMA 7B and LLaMA-3.1-8B with QLoRA) for generating complete simile sentences from a target word.

Evaluation and Benchmarking – Evaluate models with exact-match and synonym-aware automatic metrics, a human evaluation protocol, and comparisons against state-of-the-art commercial models.

Impact & Results

Performance

Four pre-trained models (TamilBERT, IndicBERTv2, MuRIL and XLM-RoBERTa) were evaluated on masked vehicle prediction. Each enhancement to the pipeline improved TamilBERT: Hits@10 rose from 0.30 for the base model to 0.32 (SSFT), 0.46 (TSFT) and 0.49 with TSFT+POS (0.69 under synonym-aware matching), exceeding the 40% Hits@10 objective, while MRR improved from 0.14 to 0.34 (0.42 synonym-aware). Against commercial models, TamilBERT TSFT+POS achieved the highest exact-match Hits@10 (0.49 vs. 0.44 for GPT-4o and 0.30 for GPT-4) and Hits@1 (0.24 vs. 0.22 and 0.15). In a human evaluation with three native Tamil speakers, the model obtained the best Precision@5 of 47.66%, ahead of GPT-4o (42.33%) and GPT-4 (28.66%). The Tamil Simile Dataset reached an inter-annotator agreement of 0.78 (Krippendorff's alpha). Exploratory full-sentence generation showed that LLaMA-3.2-1B improved BLEU from 0.0136 to 0.1081 after fine-tuning, although qualitative analysis showed that coherent simile sentences remain challenging with only 1,520 training examples.

Key Contributions

Tamil Simile Dataset (TSD)

The first manually annotated simile dataset for Tamil, comprising 1,520 sentences with 706 distinct tenors, 1,042 distinct vehicles and 1,077 distinct contexts, annotated through a multi-stage process with an agreement of 0.78. It is the first simile dataset annotated in a language other than English and Chinese.

TSFT+POS Fine-Tuning Pipeline

A two-stage fine-tuning strategy combined with pattern-based augmentation and a gated fusion mechanism for POS embeddings, enabling a compact monolingual TamilBERT model to outperform GPT-4o in human evaluation of vehicle prediction.

Uvami and the Tamil Creative Writing Assistant

Two public web applications built on the best model: Uvami, which returns the top-10 vehicle suggestions for a masked sentence or a tenor-context pair, and a creative writing assistant that embeds context-aware simile suggestions and an "Enhance Writing" feature in a Tamil text editor.

Real-world Impact

The project lays a foundation for computational figurative language processing in Tamil by releasing a reusable dataset, a proven fine-tuning methodology and a strong benchmark. Its results show that for niche creative tasks in low-resource languages, a domain-aware and linguistically informed fine-tuning approach can surpass much larger general-purpose models. The deployed tools make the research accessible to writers, poets, students and language enthusiasts. The research was funded by the University of Moratuwa Senate Research Committee (SRC) grant SRC/ST/2024/44.

Gallery

Project Poster - Simile Generator for Tamil Language (Final Year Project Showcase 2025)

Project Poster - Simile Generator for Tamil Language (Final Year Project Showcase 2025)

POS-enhanced TamilBERT architecture with gated fusion of POS embeddings

POS-enhanced TamilBERT architecture with gated fusion of POS embeddings

Uvami - the Tamil Simile Generator web application

Uvami - the Tamil Simile Generator web application

Project Team

Aathavan Nithiyananthan

Aathavan Nithiyananthan

Undergraduate Researcher

Co-developed the Tamil Simile Dataset and the POS-aware fine-tuning pipeline for vehicle prediction; first author of the DravidianLangTech 2025 paper.

Jathushan Raveendra

Jathushan Raveendra

Undergraduate Researcher

Co-developed the simile generation models and the Uvami web application, including its Hugging Face vehicle-prediction API.

Awards & Recognition

Publication at DravidianLangTech @ NAACL 2025

May 2025

The Tamil Simile Dataset was accepted and presented at the Fifth Workshop on Speech, Vision, and Language Technologies for Dravidian Languages, held with NAACL 2025

“TSD: Towards Computational Processing of Tamil Similes - A Tamil Simile Dataset”

Aathavan Nithiyananthan, Jathushan Raveendra, Uthayasanker Thayasivam

Fifth Workshop on Speech, Vision, and Language Technologies for Dravidian Languages (DravidianLangTech 2025), co-located with NAACL 2025, pp. 573–579

Association for Computational Linguistics