GEC ko+: a Grammatical and Discourse Error Correction Tool (2021)

Abstract: GECko+ : a Grammatical and Discourse Error Correction Tool We introduce GECko+, a web-based writing assistance tool for English that corrects errors both at the sentence and at the discourse level. It is based on two state-of-the-art models for grammar error correction and sentence ordering. GECko+ is available online as a web application that implements a pipeline combining the two models.

## introduction while most people can write, few would boast they never produce spelling and grammar mistakes, let alone systematically write coherent prose and express ideas clearly. natural language processing (nlp) techniques have the potential to help in that regard. in particular, such technologies can have a beneficial impact on two issues related to the way we write. first, nlp techniques can help us alleviate language-related discrimination @xcite , that occurs, e.g., in the professional world where job applications are rejected simply due to the quality of one's writing. additionally, errorful writing is poorly perceived in social contexts and is often synonymous with barriers. second, those who are already proficient in writing can benefit from these techniques to improve the quality of their prose. this aspect applies to journalists, business-persons, college students, and teachers alike. these individuals are often required to write lengthy reports. the frequency with which these reports are produced is such that topological or consistency errors can occur. as a result, their message may not be delivered as intended. to address these issues, we propose a digital writing assistance tool for english that we call gecko+ that uses existing state-of-the-art models to tackle both sentence-level mistakes and discourse incoherence. to correct spelling and grammar mistakes, we use gector @xcite , a grammatical error correction (gec) model developed by the well-known grammarly 1 . for tackling discourse incoherence, we make use of a sentence ordering model 2 @xcite based on google's bert @xcite . we created a web interface that users can access to correct paragraphs of text in english 3 . the code is publicly available on github 4 . ## background gec in nlp encompasses any sort of modifications made to automatically correct an errorful sentence. this includes spelling, punctuation, grammar, and word choice errors. given a potentially errorful sentence or short piece of text as input, a gec system is expected to output a corrected version of that text. we have reviewed several approaches to correct sentences individually @xcite . however, language does not simply consist of individual, independent sentences that are added one after the other, but rather forms a coherent whole composed of interconnected sentences. this coherent whole is commonly referred to as discourse. the area of nlp concerned with how sentences fit together is called discourse coherence or discourse analysis @xcite . discourse analysis encompasses many different aspects and can be very fine-grained. one of these aspects is sentence ordering, whose goal is to arrange sentences of a given text in the correct order, i.e., in a coherent manner. ## description of the tool gecko+ combines two state-of-the-art models into a single pipeline. to tackle sentence-wise errors, it employs gector @xcite , which treats gec as a sequence tagging task, relying on a transformer-based encoder. to address discourse coherence, it utilizes a sentence ordering model @xcite , which predicts the relative ordering between pairs of sentences from an input list of sentences. the reordering task is treated as a constraint learning task. the pipeline is shown in figure 1 . as the diagram shows, the text given as input by the user gets segmented into sentences. after the segmentation, we obtain a list s of sentences, whose length ranges from one to n. then, gector is applied to each sentence s i in s, in order to perform sentence-wise error correction. each sentence is iteratively processed by the model to ensure that all interdependent errors get corrected. as a result, the n sentences that constitute s are now free of grammatical errors. subsequently, if @xmath0, the single corrected sentence is directly output to the user. conversely, if s contains more than one 1. https://github.com/grammarly/gector 2. https://github.com/shrimai/topological-sort-for-sentence-ordering 3. https://gecko-app.azurewebsites.net/ 4. https://github.com/psawa/gecko-app figure 1 -gecko+'s pipeline. element, the potentially unordered list of sentences will be given as input to the sentence ordering model. once the sentences are ordered, the output is displayed to the user. gecko+ employs a simple but effective color code to highlight mistakes. changes are highlighted token-wise : deletions are underlined in red, modifications in blue, and additions in green. currently there is no explicit indication of how sentences have been reordered. ideally, a user should be able to visualize which sentences were swapped. we leave it for future work. refer to figure 2 for gecko+'s interface with an example sentence containing various spelling, grammar, and discourse mistakes. ## evaluation the results for gector have been reported on conll-2014 test set @xcite with the m 2 scorer @xcite and on bea-2019 development and test sets @xcite with errant @xcite . for single models, they achieved state-of-the-art performance with an xlnet-based model, which we use for our application, obtaining f 0.5 = 65.3 on conll-2014 (test) and f 0.5 = 72.4 on bea-2019 (test). the sentence ordering model was evaluated across several datasets using multiple metrics along with a human evaluation. the bert-based approach scored higher than the previous state-of-the-art method on all metrics, obtaining a sentence accuracy of 61.48 on the nips dataset. refer to @xcite for a detailed description of the results.