Advancements in A rabic Grammatical Error Detection and Correction: An Empirical Investigation (2023)

Abstract: Grammatical error correction (GEC) is a well-explored problem in English with many existing models and datasets. However, research on GEC in morphologically rich languages has been limited due to challenges such as data scarcity and language complexity. In this paper, we present the first results on Arabic GEC using two newly developed Transformer-based pretrained sequence-to-sequence models. We also define the task of multi-class Arabic grammatical error detection (GED) and present the first results on multi-class Arabic GED. We show that using GED information as auxiliary input in GEC models improves GEC performance across three datasets spanning different genres. Moreover, we also investigate the use of contextual morphological preprocessing in aiding GEC systems. Our models achieve SOTA results on two Arabic GEC shared task datasets and establish a strong benchmark on a recently created dataset. We make our code, data, and pretrained models publicly available.

## introduction english grammatical error correction (gec) has witnessed significant progress in recent years due to increased research efforts and the organization of several shared tasks @xcite @xcite . most state-of-the-art (sota) gec systems borrow modeling ideas from neural machine translation (mt) to translate from erroneous to corrected texts. in contrast, grammatical error detection (ged), which focuses on locating and identifying errors in text, is usually treated as a sequence labeling task. both tasks have evident pedagogical benefits to native (l1) and foreign (l2) language teachers and students. also, modeling ged information explicitly within gec systems yields better results in english @xcite . when it comes to morphologically rich languages, gec and ged have not received as much 1 https://github.com/camel-lab/arabic-gec attention, largely due to the lack of datasets and standardized error type annotations. specifically for arabic, the focus on gec started with the qalb-2014 @xcite and qalb-2015 @xcite shared tasks; however, recent sequence-to-sequence (seq2seq) modeling advances have not been explored much in arabic gec. moreover, multi-class arabic ged has not been investigated due to the lack of error type information in arabic gec datasets. in this paper, we try to address these challenges. our main contributions are as follows: more recently, edit-based models have been proposed to solve gec @xcite @xcite @xcite @xcite . while seq2seq models generate corrections to erroneous input, edit-based models generate a sequence of corrective edit operations. edit-based models add explainability to gec and improve inference time efficiency. however, they generally require human engineering to define the size and scope of the edit operations @xcite . @xcite presented the first ged results using a neural approach framing ged as a binary (correct/incorrect) sequence tagging problem. others used pretrained language models (plms) such as bert @xcite , electra @xcite , and xlnet @xcite to improve binary ged @xcite @xcite . @xcite and @xcite demonstrated that combining ged and gec yields improved results: they used multi-task learning to add token-level and sentence-level ged as auxiliary tasks when training for gec. similarly, @xcite showed that binary and multi-class ged improves gec. ## arabic grammatical error detection most of the work on ged has focused on english ( §2), where error type annotations are provided manually @xcite or obtained automatically using an error type annotation tool such as er-rant @xcite . however, when it comes to morphologically rich languages such as arabic, ged remains a challenge. this is largely due to the lack of manually annotated data and standardized error type frameworks. in this work, we treat ged as a mutli-class sequence labeling task. we present a method to automatically obtain error type annotations by extracting edits from parallel erroneous and corrected sentences and then passing them to an arabic error type annotation tool. to the best of our knowledge, this is the first work that explores multi-class ged in arabic. ## arabic grammatical error correction recently developed gec models rely on transformer-based architectures, from standard seq2seq models to edit-based systems built on top of transformer encoders. given arabic's morphological richness and the relatively small size of available data, we explore different gec models, from morphological analyzers and rule-based systems to pretrained seq2seq models. primarily, we are interested in exploring modeling approaches to address the following two questions: morphological disambiguation (morph) we use the current sota msa morphological analyzer and disambiguator from camel tools @xcite . given an input sentence, the analyzer generates a set of potential analyses for each word and the disambiguator selects the optimal analysis in context. the analyses include minimal spelling corrections for common errors, diacritizations, pos tags, and lemmas. we use the dediacritized spellings as the corrections. ## experiments 6.1 arabic grammatical error detection we build word-level ged classifiers using transformer-based plms. from the many avail-43-class 13-class 2-class p r f 0.5 acc. p r f 0.5 acc. p r f 0.5 acc. ## conclusion and future work we presented the first results on arabic gec using transformer-based pretrained seq2seq models. we also presented the first results on multi-class arabic ged. we showed that using ged information as an auxiliary input in gec models improves gec performance across three datasets. further, we investigated the use of contextual morphological preprocessing in aiding gec systems. our models achieve sota results on two arabic gec shared tasks datasets and establish a strong benchmark on a recently created dataset. in future work, we plan to explore other ged and gec modeling approaches, including the use of syntactic models @xcite . we plan to work more on insertions, punctuation, and infrequent error combinations. we also plan to work on gec for arabic dialects, i.e., the conventional orthography of dialectal arabic normalization @xcite @xcite .