Tool deep dive
Grammar checker
Finds and fixes grammar, spelling and punctuation errors in Sinhala news text, without rewriting sentences that were already correct.
Built by Nisal Fonseka
How it works
Fix only what is wrong
The model is instructed to fix errors only and to return correct text unchanged. Training included already-correct sentences so it learns that not every input needs an edit.
A small, efficient adapter
The grammar adapter uses a low rank (r=4). The paper reports it uses about one eighth of the trainable parameters of the rank-32 configurations while staying statistically comparable on its Stage 6 test.
Corrections you can review
The API returns the corrected text together with word-level corrections, so the app can show each change instead of only the final text.
A rule validator as a safety net
A rule-based validator reviews each edit and can flag or roll back risky changes to names and numbers, while keeping the corrections that are right.
What the training data covers
From the team’s dataset notes:
- Spelling and look-alike letters, for example ණ/න and ළ/ල
- Word order (subject–object–verb)
- Plural verb agreement in literary Sinhala
- Already-correct sentences, kept as a control set
The model and its data
- Evaluated adapter
- v27
- LoRA rank / alpha
- r=4, α=4
- Trainable parameters
- 10,485,760
- Training epochs
- 3
- Dataset
- 36,006 rows · Correct or incorrect input paired with the corrected text
These are the versions evaluated in the paper, not necessarily the versions running in the app today.
Measured results
56.99%
Output exactly matches the corrected reference
Measured on: 286 hand-reviewed inputs (143 faulty, 143 clean controls)
Strict exact match: a valid fix worded differently still counts as a miss.
63 of 143
Faulty sentences corrected
Measured on: The 143 faulty inputs
Baselines on the same inputs: ByT5-small corrected 12 and mT5-small corrected none.
66.88% → 66.88%
Rule validator added to the grammar model
Measured on: 154 saved development predictions
The validator removed the one observed unsupported name change without losing any correct edits. It was tuned on this set, so the paper calls it an ablation, not an independent benchmark.
A lesson from this tool
A safety net that cost accuracy
A rule-based checker meant to protect grammar edits was blocking good corrections too.
- The problem
- Rules were added to stop the grammar model from changing names or numbers.
- What we found
- The first, blanket-veto version dropped exact match from 66.88% to 57.14% by blocking useful edits.
- What we did
- A selective policy restored 66.88% and removed the one observed unsupported name change. The paper flags this as an ablation on the development set.
What testers said about it
13 people rated these statements from 1 to 5 in 27–31 August 2026. It is a small, self-selected pilot.
The system correctly found grammar errors.
4.2 / 5 · 11 of 13 rated 4–5
The suggested corrections were correct and useful.
4.4 / 5 · 11 of 13 rated 4–5
The grammar checker is useful for journalism work.
4.4 / 5 · 11 of 13 rated 4–5
- 1 (disagree)
- 2
- 3
- 4
- 5 (agree)
Next deep dive
Headline generator