NLP Research — 2026
Pantun Theme Classification
“Teaching a model to read the half of a pantun that carries the meaning.”
Role
First author — pipeline design, model implementation, deployment
Context
Accepted at AiDAS 2026
Focus
Architectures benchmarked
TF-IDF feature dimensions
Second inference ceiling
Malay pantun has a two-part structure: the pembayang sets an image, the maksud carries the point. Feed a classifier both halves and the imagery drowns the meaning. This work segments them first, then benchmarks a classical baseline against a neural model on what remains.
The problem
A pantun’s first couplet is deliberately oblique — it exists to set rhyme and rhythm, not to state the theme. A bag-of-words model trained on the full quatrain therefore learns from text that is, by design, not about the subject. Malay also lacks the mature preprocessing tooling English enjoys, and the corpus is small enough that vocabulary sparsity becomes the dominant failure mode rather than an afterthought.
What I built
A regex-based segmenter isolates maksud from pembayang before anything else runs, followed by case folding, tokenisation and Porter stemming to pull the vocabulary down to a size the corpus can actually support. Two models are then trained on identical splits: an SVM with an RBF kernel over 10,000-dimensional TF-IDF unigram and bigram features with sublinear scaling, and a PyTorch TextCNN using parallel 1D convolutions at multiple kernel widths with global max-pooling, so it picks up local n-gram patterns without needing the corpus size a transformer would demand.
How it works
Pembayang/maksud segmentation
A regex segmenter splits the quatrain on its structural boundary so the classifier trains on the semantically loaded half. This is the step that makes the rest of the pipeline worth running.
Normalisation for a small corpus
Case folding, tokenisation and Porter stemming, chosen specifically to reduce vocabulary sparsity. On a corpus this size, unchecked vocabulary growth hurts more than the information lost to stemming.
SVM baseline
RBF-kernel SVM over 10,000-dimensional TF-IDF unigram and bigram features with sublinear term-frequency scaling — a strong, honest baseline that a neural model has to actually beat.
TextCNN
Parallel 1D convolutional layers at several kernel widths with global max-pooling, capturing localised n-gram syntax. Chosen over a full transformer fine-tune because the corpus does not justify the parameters.
Deployment
A Flask API that lazy-loads weights (joblib, pth, safetensors) on first request and caches them in process, holding response times under one second without keeping every model resident at boot.
Outcome
A benchmarked comparison of classical and neural approaches on a low-resource Malay task, deployed behind a Flask API that lazy-loads and caches model weights to keep end-user inference under one second. Accepted to AiDAS 2026.
Stack