balochi-poet-classifier
Balochi Poet Classifier Team
Given two lines of Balochi poetry, can a computer tell which of three poets wrote them? Balochi has almost no language technology built for it, so even assembling the 1,670 hand-checked verses mattered; three students shared that work. Our founder, Salman Adnan, built the part that cleans the verses and teaches the computer to tell the poets apart; that step needs a faster machine than he had, so no success rate is claimed.
Our founder's part of a three-person course project: the classification pipeline (preprocessing, training, evaluation, inference). Preprocessing runs end to end on the real dataset and the training and evaluation code is verified to execute, but full fine-tuning of the ~278M-parameter model was not completed (CPU was about 28 seconds per step). No accuracy number is claimed.
Overview
Authorship attribution for Balochi poetry: given a single couplet, predict which of three poets wrote it, by fine-tuning xlm-roberta-base for 3-way sequence classification. Balochi is a low-resource language with almost no prior computational work, which is the point.
Dataset
- Data.csv: 1,670 couplets in Perso-Arabic script. Adam Haqqani 860 (51.5%), M.H. Khalil 670 (40.1%), Mir Ahmed Ali Mir 140 (8.4%).
- Verses are short: 3 to 58 characters, mean 33.6. No rows are dropped by cleaning.
- Provenance: compiled from the Balochi Academy's digital archive and published poetry books, extracted with OCR and PdfPlumber, then manually verified.
Approach
- Fine-tune xlm-roberta-base, chosen because its SentencePiece vocabulary already covers Perso-Arabic characters, so Balochi tokenizes into subwords instead of unknown tokens.
- Class imbalance (8.4% minority class) is handled with sklearn balanced class weights (computed 0.647 / 0.832 / 3.973) fed into a custom WeightedTrainer that overrides compute_loss with weighted cross-entropy.
- Stratified 70/15/15 split, seed 42: train 1,168, val 251, test 251. Batch 16, lr 2e-5, max 10 epochs, early stopping on weighted F1.
Results
No accuracy is reported. The pipeline runs end to end on the real dataset, the training and evaluation code is verified to execute (a few steps on CPU with a tiny stand-in model under transformers 4.57.6), and the honest next step is a GPU run on a free Colab T4, which should finish under an hour.