[Paper Review] Bangla Grammatical Error Detection Using T5 Transformer Model
This paper proposes a fine-tuned small BanglaT5 model for Bangla Grammatical Error Detection (GED), leveraging a text-to-text transfer approach despite T5's original design for translation. Post-processing with character-level correction, regex-based error handling, and a lookup table reduced the average Levenshtein distance to 1.0394 on a 5000-sentence test set, demonstrating strong performance for low-resource language GED.
This paper presents a method for detecting grammatical errors in Bangla using a Text-to-Text Transfer Transformer (T5) Language Model, using the small variant of BanglaT5, fine-tuned on a corpus of 9385 sentences where errors were bracketed by the dedicated demarcation symbol. The T5 model was primarily designed for translation and is not specifically designed for this task, so extensive post-processing was necessary to adapt it to the task of error detection. Our experiments show that the T5 model can achieve low Levenshtein Distance in detecting grammatical errors in Bangla, but post-processing is essential to achieve optimal performance. The final average Levenshtein Distance after post-processing the output of the fine-tuned model was 1.0394 on a test set of 5000 sentences. This paper also presents a detailed analysis of the errors detected by the model and discusses the challenges of adapting a translation model for grammar. Our approach can be extended to other languages, demonstrating the potential of T5 models for detecting grammatical errors in a wide range of languages.
Motivation & Objective
- To develop a grammatical error detection system for Bangla using a pre-trained T5 model, despite T5's original design for translation tasks.
- To address the challenge of adapting a sequence-to-sequence model like T5 for error detection in low-resource languages like Bangla.
- To improve model output through extensive post-processing techniques, including character-level correction, regex-based error detection, and a lookup table for exact matches.
- To evaluate the effectiveness of the approach using Levenshtein distance on a test set of 5000 sentences.
- To establish a foundation for applying T5-based models to grammatical error detection in other low-resource languages.
Proposed method
- Fine-tuned the small variant of BanglaT5 (60M parameters) on a corpus of 9385 Bangla sentences with bracketed errors using the $ symbol to mark errors.
- Applied a character-level correction algorithm that compares input and output character-by-character, using a manually constructed lookup table for common T5 errors.
- Implemented a word-level correction step that replaces entire erroneous words in the T5 output before reapplying character-level correction.
- Used a regular expression-based algorithm to detect and correct common error patterns identified from the training data.
- Incorporated a lookup table to directly retrieve known error-marked sentences from the training set when exact matches were found in the test set.
- Combined all post-processing steps in sequence, with the final pipeline applying character correction, word correction, regex, lookup, and a second post-processing pass.
Experimental results
Research questions
- RQ1Can a T5-based model fine-tuned on a small Bangla error-correction dataset effectively detect grammatical errors in Bangla?
- RQ2How effective are post-processing techniques in improving the raw output of a T5 model for grammatical error detection?
- RQ3What is the impact of combining multiple post-processing strategies—character-level correction, regex, word-level correction, and lookup—on Levenshtein distance?
- RQ4How does the performance of the small BanglaT5 variant compare to the base variant in the context of Bangla GED?
- RQ5To what extent can a lookup table of known error patterns improve detection accuracy without relying on deep learning inference?
Key findings
- The fine-tuned small BanglaT5 model achieved a raw Levenshtein distance of 3.212 on the test set before any post-processing.
- After applying character-level correction alone, the Levenshtein distance dropped to 1.1206, indicating significant improvement in output quality.
- The combination of character-level correction, word-level correction, regex, and lookup table reduced the average Levenshtein distance to 1.0394 on the test set.
- The lookup table improved performance by identifying and directly retrieving 253 sentences with exact matches from the training data.
- The regex-based algorithm corrected 107 sentences that failed character-level correction, reducing the Levenshtein score from 1.0866 to 1.0394 when combined with other steps.
- The final model achieved a private score of 1.0224 and public score of 1.0564, with an aggregated average Levenshtein distance of 1.0394.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.