String Editing Based C hinese Grammatical Error Diagnosis (2022)

Abstract: Chinese Grammatical Error Diagnosis (CGED) suffers the problems of numerous types of grammatical errors and insufficiency of training data. In this paper, we propose a string editing based CGED model that requires less training data by using a unified workflow to handle various types of grammatical errors. Two measures are proposed in our model to enhance the performance of CGED. First, the detection and correction of grammatical errors are divided into different stages. In the stage of error detection, the model only outputs the types of grammatical errors so that the tag vocabulary size is significantly reduced compared with other string editing based models. Secondly, the correction of some grammatical errors is converted to the task of masked character inference, which has plenty of training data and mature solutions. Experiments on datasets of NLPTEA-CGED demonstrate that our model outperforms other CGED models in many aspects.

## introduction the traditional methods of grammatical error diagnosis (ged) are pipeline-based, which has three main steps in series, including error detection, selection of candidate corrections, and ranking of candidate corrections @xcite . with the wide application of seq2seq models, seq2seq based ged models are designed to combine error detection and error correction @xcite . considering the low efficiency of decoding in seq2seq and the uncontrollability of the generated results, researchers tend to apply the mode of sequence tagging for ged which outputs the correction operations instead of direct correction results. the sequence tagging based ged methods are designed based on edit distance algorithms, such as levenshtein distance @xcite , which produces edit operations that are used to transform one sentence to the other. because the intersection of an ungrammatical sentence and the corrected sentence is often large, it is feasible to transform them to each other based on a few edit operations. several string editing based ged methods for english have been recently proposed, such as lasertagger @xcite , pie @xcite and gector @xcite . the string editing based ged methods are highly accurate, controllable and interpretable @xcite . fine-grained data processing and edit tags designing are crucial. however, the size of the tag vocabulary is generally very large, which makes the current string editing based ged methods work better on closed sets, but difficult to deal with the complexities and long-tail problems on open datasets @xcite . the current string editing based ged methods are mostly designed for processing english texts. compared with english, cged has to deal with more types of errors with less training samples @xcite . furthermore, it is difficult to detect chinese grammatical errors based on explicit linguistic features due to the complexity and ambiguity of chinese grammars @xcite . chinese grammatical errors can be corrected by text edit operations in theory, but there are currently no papers detailing how to detect and correct chinese grammatical errors based on string editing. in this paper, we propose a string editing based cged model, named se-cged, which detects and corrects chinese grammatical errors based on text edit operations. the brief description of se-cged and the contributions of our work are presented below. 1) in se-cged, the process of cged is separated into three main stages, including seq2edit, string editing, and masked charac-ter inference. detection of grammatical errors, and correction of different types of errors are handled in different stages. this paper is organized as follows: section 2 briefly reviews the literature on grammatical error diagnosis and cged. section 3 presents the basic concepts and the workflow of string editing based chinese grammatical error diagnosis. section 4 explains the model training and prediction of our proposed approach. section 5 demonstrates the experimental setting and the experiment results. section 6 discusses the limitations of our methodology and potential speculations of our works. ## background and related works the target of a ged system is to give a correction for a sentence with grammatical errors. the seq2seq generative model is well suited for the ged task. models of machine translation have been adopted in ged and achieved good results @xcite . different from machine translation, the language of the source sentence and the target sentence in ged is the same, and there is a large intersection between the two sequences. therefore, the copy mechanism was applied for ged to reduce the computation of text generation @xcite . lack of training data is a major bottleneck for ged systems. to supplement training data, @xcite tried to use the nbest results of the seq2seq model to produce more pairs of correct and incorrect sentences, and zhou et al., 2020 constructs training samples based on the uneven results of different translation models. however, the man-made training samples are significantly different from the real grammatical cases. the mode of sequence tagging is recently prevailing for ged because it is more efficient in decoding and can produce more controllable results, compared with seq2seq models @xcite . @xcite proposes lasertagger, a general sequence tagging approach that casts text generation as a text editing task. lasertagger sets three types of tags, including 'keep', 'delete' and 'p'. 'p' can be a word or a phrase that should be added before the current position. @xcite proposes pie, a sequence tagging based ged model. in pie, the types of edit operations include 'copy', 'append', 'delete' and 'replacement'. in the operations 'append' and 'replacement', the specific words that used to append or replace should be indicated. an iterative refinement sequence annotation method is proposed to predict the token level edit operations. @xcite proposes gector, a simple and efficient ged sequence tagger. gector specifically defines several tags of grammatical edit operations. the tag vocabulary size is 5000, including 4971 basic transformations (token-independent keep, delete and 1167 token-dependent append, 3802 replace) and 29 token-independent g-transformations. ## conclusions in this paper, we proposed a phased string editing based approach for chinese grammatical errors diagnosis. the detection and correction of grammatical errors are performed based on edit tags and masked character inference. in this way, different types of grammatical errors can be handled in the same way, and the training data is significantly reduced. experiments on the dataset of nlptea-cged evaluations show our proposed approach performs better than the traditional methods in performance and speed. because of the complexity of chinese grammars, there are still many deficiencies in our current work, and the detection of error type and location is not accurate. in future research, we will further improve the rationality of data argumentation and make the synthetic error samples more consistent with practical grammatical errors. in addition, we will try to import linguistic features to further improve the detection and correction of chinese grammatical errors.