Elamur Research

Neural Grammatical Error Correction for Romanian

Paper · 2020 · Teodor-Mihai Cotet, Ştefan Ruşeţi and Mihai Dascălu

Summary

A spelling suggestion can fix a malformed word and still miss what is wrong with a sentence. A word may be spelled correctly but have the wrong ending, appear in the wrong place, or be a poor fit for what the speaker means. Grammatical error correction treats these as parts of the same task. Given a piece of text, a system must decide what to change and what to preserve. For Romanian, the authors identify a shortage of original texts paired with corrected versions, the examples needed both to train a system and to find out how well it works.

In the paper, the authors present RONACC, short for Romanian National Audiovisual Council Corpus, and describe it as the first corpus of its kind for Romanian. It contains roughly 10k pairs. Some are phrases or full sentences from Romanian television and radio, with corrections from the council. Others represent mistakes typical of writing. The authors also adapt ERRANT, a toolkit that compares an original text with its correction and identifies the individual edits. It allows the authors to describe the errors in the corpus and evaluate whether the corrections a system proposes agree with the reference edits.

The authors train a small Transformer on RONACC alone and use it as their baseline. For the larger system, they first turn 10 million filtered Romanian Wikipedia sentences into training pairs by introducing mistakes and keeping the originals as the targets. In fine-tuning, the system continues training on RONACC after this synthetic stage. The small system scores 44.38 on the paper’s RONACC F₀.₅ measure, which gives more weight to the reliability of proposed edits than to the share of reference edits recovered. The best larger system scores 53.76. Carrying the optimizer state into the RONACC stage works better than resetting it, chiefly because the resulting corrections have higher precision.

The improvement varies with the kind of text. The largest gain over the baseline occurs on the written group, which includes material from Wikipedia. Full sentences from broadcasts benefit least and remain the hardest group for both systems. Examples show why the distinction matters. The system can correct spelling and Romanian noun endings, yet it sometimes leaves a word-order problem in place or substitutes a similar-looking word that changes the meaning. The authors also find that the best system still struggles with errors involving Romanian diacritics. The experiments establish a stronger benchmark for Romanian correction while showing how the source and type of synthetic errors influence what the system learns to fix.

Deep dive: Neural Grammatical Error Correction for Romanian

The paper builds a Romanian grammar correction benchmark and shows how training on synthetic Wikipedia errors improves edit accuracy. · about 36 minutes to read

The problem and its context

Correction starts with deciding whether to intervene

Grammatical error correction takes a text as input and returns a revised text. In spite of the name, the paper includes spelling, punctuation, and word choice alongside grammar. That scope matters because a visible change can solve more than one kind of problem. Adding a hyphen may repair the way two elements are written together. Changing a noun ending may express a grammatical distinction. Replacing an entire noun may be necessary if it is inappropriate in context, even when its spelling and inflection are legitimate.

This makes preservation part of the task. A corrector that sees an unfamiliar word has several possibilities to contend with. The word could contain a typographical error, it could be an informal expression, or it could be a word from another language. If the surrounding sentence supports the original meaning, a replacement based only on spelling resemblance can damage a passage. Conversely, a word can look familiar and occur in a dictionary while still being wrong where the author put it. The system has to use the other words to decide which situation it is facing.

A corpus for the task typically gives the system a sentence and a corrected version. The same pairing supports evaluation. The original tells the evaluator what the system started with, while the correction records what an editor decided to change. The authors point to JFLEG as a different design in which each original has four corrected references. Multiple references give the evaluation more room for fluent alternatives. A correction may be defensible even if it uses different words from one editor’s revision, and several references make it possible to recognize more of those alternatives.

Comparing complete sentences would make it hard to see what a corrector had actually done. Even a weak system can reproduce much of a sentence simply by copying it. The paper instead follows work that represents each repair as an edit, a change from a particular span in the input to its replacement. An insertion has an empty input span, a deletion has an empty replacement, and a substitution has material on both sides. A repair can also cover several words. The evaluator needs a way to decide where an edit starts and ends before it can compare the system’s decisions with the editor’s.

Why Romanian required a corpus of its own

Most of the progress the authors survey concerns English. They describe existing work on Arabic, German, Russian, Czech, Chinese, and Japanese, and point to a review that discusses data and results for several of those languages. The Romanian gap was specific to paired data. A dictionary can supply candidate spellings, and unedited running text can provide examples of ordinary usage. A correction corpus offers something different. It shows a problematic expression in context and records the expression an editor used in its place.

Romanian broadcast corrections gave the authors access to a particular kind of paired material. The National Audiovisual Council oversees television and radio and had corrected phrases and sentences from those media. Such examples let the benchmark include words that Romanian speakers actually used, along with the council’s preferred revisions. The authors supplement these examples with written material because a benchmark drawn entirely from broadcasts would reflect the kinds of mistakes and editorial decisions found there. Spelling on the page and lexical choices in speech create different demands on the same corrector.

The paper treats this as a low-resource language setting for correction. In the preceding work it discusses, the low-resource track of the BEA 2019 shared task gave participants a limited stock of official correction pairs while allowing them to obtain additional examples by other means. The development portion of the Cambridge English Write & Improve and LOCNESS material contained 4,384 pairs available in that setting. This gave the Romanian authors a precedent for working with relatively little annotated data while drawing on a much larger collection of ordinary text.

The distinction matters when reading the paper’s experiments. The authors have limited access to examples of mistakes and their intended corrections. They have access to substantially more Romanian text that can be used as the basis for artificial examples. Those are different resources. A sentence from Wikipedia can show how words fit together in writing. It takes an additional decision to turn it into an example of what a person might get wrong and what an editor would do about it.

How earlier systems made use of limited supervision

The authors describe a shift that paralleled developments in machine translation. Earlier correction systems used phrase-based methods, treating the transformation from a faulty sentence to an edited sentence as a relationship between pieces of text. Neural approaches came to dominate the results surveyed in the paper, including the leading systems for the CoNLL 2014 English benchmark. The Transformer provides one way to carry that approach over to Romanian. The encoder and decoder can represent a word in relation to other words, which is useful when the surrounding sentence determines whether a change is needed.

The paper also discusses a route that starts from a spellchecker and a language model. The spellchecker supplies a confusion set, a list of forms that might be intended in place of the word the system sees. The language model scores how well the whole sentence reads after a candidate change. In the approach by Bryant and Briscoe, the system repeatedly considers substitutions and takes the change that improves the normalized sentence score, subject to a threshold. Options for articles and prepositions extend what the spellchecker alone proposes. This turns a list of plausible spellings into contextual decisions without requiring a large collection of paired corrections.

A source of naturally occurring revisions is the edit history of Wikipedia. It can provide two versions of a sentence, but some differences between versions reflect changes in content rather than repairs to the language. Work reviewed in the paper filters those differences to retain likely grammatical revisions. The German work uses ERRANT to classify edits as part of the filtering process. The paper reports that filtering improved training compared with taking the Wikipedia changes indiscriminately. The value of the resource therefore depends partly on identifying which revision pairs are examples of the correction task.

Another approach starts from a sentence treated as acceptable and creates a flawed version deliberately. The paper describes earlier work that inserts errors derived from an annotated corpus and work that replaces words with options from a spellchecker’s confusion sets. The latter was central to the approach of Grundkiewicz and colleagues in the English low-resource shared task. It is the main precedent for the Romanian generator. A confusion set is useful in this role because a candidate resembling the original can make the artificial problem harder than a replacement that is immediately recognizable as unrelated.

The related work also discusses BERT, a system pretrained to recover hidden words from surrounding text. According to the account in the paper, a challenge for correction is that its representations of an erroneous word and its corrected counterpart can be very similar. A correction encoder needs to convey the difference between the two. An earlier study addressed this by first training BERT to detect grammatical errors, then using its representations as additional information for correction. For the Romanian study, the principal method instead makes the pretraining task itself a correction task. It starts with corrupted text and asks the system to generate the original.

The method, step by step

The method depends on two collections of pairs with the same orientation. In RONACC, an example begins with the wording that was found and ends with the reference revision. In the Wikipedia collection, an example begins with a corrupted version and ends with the sentence from which it was made. The encoder receives the first member of a pair, and the decoder learns to produce the second. The authors use synthetic pairs to give the larger system broad practice at this transformation, then use the Romanian corrections to adapt it to the benchmark. The baseline takes the shorter route through RONACC alone.

Training and evaluating the pretrained Romanian corrector

The steps in order.

Training and evaluating the pretrained Romanian correctorStep 1: Filter Romanian Wikipedia sentences1. Filter Romanian Wikipedia sentencesStep 2: Introduce word and character errors2. Introduce word and character errorsStep 3: Pair corrupted inputs with their originals3. Pair corrupted inputs with their originalsStep 4: Pretrain the Transformer on synthetic pairs4. Pretrain the Transformer on synthetic pairsStep 5: Continue training on RONACC corrections5. Continue training on RONACC correctionsStep 6: Decode candidate revisions with beam search6. Decode candidate revisions with beam searchStep 7: Score predicted edits against reference edits7. Score predicted edits against reference edits

Assemble corrections for speech and writing

RONACC is a corpus of native Romanian. Its broadcast examples come from television and radio, with corrections supplied by the National Audiovisual Council. The authors organize the material into NAC-phrases, NAC-sentences, and W-sentences. These groups cover distinct kinds of input even though all of them can be represented as a pair of token sequences.

NAC-phrases contains broadcast phrases without a verb. A fragment of this kind can still be a complete correction example. The person reading it may need to repair an ending or the spelling of a word without needing the missing portion of the utterance. NAC-sentences consists of structurally complete broadcast sentences. W-sentences is also made up of complete sentences, but the examples represent written mistakes. Thus the group distinction concerns both sentence structure and where the error occurs in language use. The corpus retains phrases when there is enough information in the phrase itself to choose a correction.

The authors assign 70% of RONACC to training, 15% to development, and 15% to testing. They report an equal contribution from each of the groups within each partition. The training portion supplies examples for learning, the development portion offers a separate view during development, and the test portion is reserved for assessing a trained system. Keeping the groups represented across the partitions makes it possible to look at each kind of text under the same broad experimental setup.

For the baseline, this is the entire source of paired supervision. It teaches the system both to copy material that should remain and to make the kinds of changes found in the recorded corrections. For the larger system, the same data plays a different role in the training sequence. It comes after a stage in which the system has practiced repairing artificial errors. The RONACC pairs then provide examples of which repairs matter on the target material and what a revised phrase or sentence is expected to look like.

Turn a pair of sentences into a set of edits

The paper adapts the simplified German version of ERRANT for Romanian. The toolkit performs two connected jobs. It extracts edits by aligning the two sides of a pair, and it classifies those edits so the corpus can be described in linguistic terms. The authors use the extractor for both human corrections and system predictions. An analysis that describes what types of changes occur in the corpus and a score that counts matching edits therefore begin with the same interpretation of the sentence pairs.

The alignment procedure draws on Damerau–Levenshtein distance. In this setting, distance is a way of searching for a low-cost sequence of changes that transforms one token sequence into another. The procedure considers operations such as inserting, deleting, substituting, and moving tokens by transposition. The costs influence the explanation that the alignment chooses. If a word and its replacement are related by form, treating them as a substitution can represent the correction better than deleting the old word and separately inserting the new one. Linguistic information in the costs helps favor the substitution where appropriate.

An alignment records possible transformation costs in a matrix and follows an optimal path through it to recover the changes. Some changes detected along this path are merged into one edit spanning several tokens. In linguistic terms, the aim is to mark the words affected by a single repair. The paper emphasizes that several segmentations are possible. Changing the alignment costs can change which edits result from the same pair of sentences. The intended standard is to recover spans that resemble what a human annotator would mark.

After alignment, the toolkit uses part-of-speech tagging to classify edits. A part-of-speech tag gives a word’s grammatical category in context, such as noun or verb. The Romanian adaptation draws on a Romanian spaCy tagger integrated into ReaderBench and uses the categories of Universal Dependencies. The rules use these categories in place of German-specific tags. The authors remove the German TRUNC tag and the separate CONTR category for contractions. They describe the evaluation toolkit as using 50 rules.

The part-of-speech category includes 14 Universal Dependencies tags, and a FORM label can mark a change between tokens that have the same lemma. A lemma is the underlying dictionary form associated with different surface forms of a word. NOUN:FORM can therefore distinguish a change within the forms of a noun from a case in which one noun is replaced by another. This distinction helps the authors examine morphology, the way words change form to express grammatical information.

Other categories capture kinds of changes that a part-of-speech name alone would describe poorly. MORPH accounts for changes involving word form. ORTH covers differences in capitalization or spacing. ORDER marks reordered tokens. For spelling, ERRANT uses a word list from the Hunspell dictionary. The SPELL rule uses the absence of a candidate from the dictionary and substantial character overlap with the corrected form, with the paper describing the overlap as more than half. In this project Hunspell’s word list supports the analysis of corrections, while Aspell supplies suggestions when the authors generate artificial mistakes. These are separate uses of spelling resources.

The same machinery allows the authors to describe the errors created by the synthetic generator. They can compare, for example, whether the generator produces changes to a noun’s form as often as the reference corpus does. A match between the broad error distributions would support the idea that the artificial task offers relevant practice. A mismatch at a finer level can identify where the training material gives the system a different picture of correction from the one encoded by RONACC.

Select sentences to use as synthetic targets

The generator starts with individual sentences from Romanian Wikipedia. It treats the retained sentences as targets, so sentence selection affects the standard that the system learns to reproduce. The authors report that the collection obtained from the dump contains web links, metadata, and stretches of text that are incomplete or fail to read as sentences. If one of those stretches is used as the target, the pipeline can teach a system to reconstruct a defect that was already in the source.

The filters favor sentences with recognizable beginnings and endings. A retained sentence begins with an upper-case letter. Its final punctuation is a sentence end mark, with the authors excluding cases where the apparent ending belongs to an abbreviation. The filters also look for strings indicative of links, consider quotation marks, and check that the counts of opening and closing marks agree for parentheses and square brackets. These checks are ways of screening extracted text for visible signs that it belongs to ordinary running prose.

Romanian spelling motivates a separate filter. The ratio of diacritic characters to characters without diacritics has to exceed 1%. The authors observe that Romanian digital text, including material in Wikipedia, is sometimes written without these marks. This threshold favors sentences that contain them, giving the generator targets in which standard spellings with diacritics are represented. Another character-composition rule has a threshold reported as 2.5% and is intended to reject metadata. The paper describes it in terms of ASCII characters, diacritic characters, and other characters, without specifying the ratio clearly enough to reconstruct it from that description alone.

A length rule keeps sentences with more than 8 words. It gives the corrector surrounding language to draw on when one of the words is difficult to identify. A spellchecker can list nearby alternatives even for a single word, but a correction learner benefits from the other words if several alternatives could fit the spelling. The paper reports a collection of 10 million sentences after filtering. They are the starting material for the artificial correction pairs.

The filters also give the generated collection a different shape from RONACC. Editorial prose with conventional punctuation, an upper-case beginning, and enough words to pass the length rule is a useful source of complete sentences. Its resemblance to a short broadcast phrase is more limited. The choice to prefer well-formed full sentences is appropriate for producing clean targets and gives a concrete reason to examine the outcome separately for the written, broadcast sentence, and broadcast phrase groups.

Decide how many words to alter

The generator varies the amount of corruption from sentence to sentence. The authors begin by sampling an error rate from a normal distribution.

pₑᵣᵣ ∼ Normal(0.15, 0.2)

Here pₑᵣᵣ denotes the sampled error rate for the sentence. The symbol ∼ means that its value is drawn from the distribution on the right. Normal names the distribution. Its mean is 0.15 and its standard deviation is 0.2, using the paper’s descriptions of the two values. The authors choose this scheme to imitate the proportion of errors found in correction data while allowing the amount of corruption to vary.

The sampled rate is converted into a count using sentence length.

N꜀ₕₐₙɢₑ𝒹 = round(pₑᵣᵣ × L)

N꜀ₕₐₙɢₑ𝒹 is the number of word positions to sample for alteration. L denotes the length of the sentence in words, and × multiplies that length by the sampled rate pₑᵣᵣ. The function round converts the product to a whole number. The equals sign gives the resulting count. Using a sentence-dependent count lets the same rate apply to texts of different lengths.

The next operation samples that many word positions uniformly without replacement. Each position is eligible on the same terms, and a position already drawn cannot be selected again in that sampling pass. This describes the selection of positions. The operation applied at a selected position can also affect an adjacent word, as happens with a swap. The paper leaves open how the implementation handles samples for which rounding would produce a count outside the available range of positions.

Create word-level and character-level mistakes

For a sampled word position, substitution is the most likely operation. With probability 0. 7, the generator selects a substitute from the word’s Aspell confusion set using only the 20 highest-ranked suggestions. This makes the original target a form that the corrector may have to infer from context. If the altered sentence contains a similar-looking word, deciding what to output can require a judgment about the sentence as well as the spelling.

The other word operations have probability 0.1 each. The generator can delete the selected word, insert a random word after it, or swap it with a neighbor. These give the system practice with different operations in the reverse direction. In the training pair, restoring a deleted word calls for an insertion. Removing a random extra word calls for a deletion. Undoing a swap requires recognizing the preferred order in context. The output remains an entire sentence in each case. The learner sees the effect of the transformation and the clean target.

The authors also describe applying the corresponding kinds of operations at character level, affecting 10% of the words in a sentence and using the same operation probabilities. The purpose is to give the system practice with errors inside words. An inserted or deleted character can make a word malformed, and a local character change can also leave a string that closely resembles another form. Character corruption complements the use of spellchecker alternatives by giving the corrector examples of damaged spellings to reconstruct.

The paper analyzes a sample of 300 thousand pairs from the 10 million generated examples with the adapted ERRANT toolkit. The same generation rules apply across the collection, which is why the authors expect this sample to describe its composition. They report some resemblance between the synthetic and RONACC distributions and more pronounced differences in the breakdown by part of speech. In particular, edits classified by the FORM label contribute less to the synthetic corpus. NOUN edits have a greater share there, while PUNCT edits have a smaller share. The categories are helpful because two collections can present a broadly similar repair task while giving very different amounts of practice at specific kinds of correction.

Train a corrector that produces the whole sentence

A Transformer forms the architecture and includes both encoder and decoder components. The encoder represents the input sequence in context. Its attention operations allow the representation of a token to depend on other tokens. The decoder produces a revised sequence using information from the encoder and the output it has already generated. A word can remain unchanged simply because it is generated again at the appropriate point. Insertions, replacements, and reordering are expressed by the output sequence itself. ERRANT derives the corresponding edits later for analysis and scoring.

The paper uses subword tokenization to address the problem of words beyond a fixed vocabulary. Word pieces let the system represent some words as sequences of smaller units. An unusual inflection or a damaged spelling can thus be passed to the Transformer in pieces even when the full form has no entry of its own. These units serve the encoder and decoder. The evaluator’s edit spans serve a different purpose and describe changes at the level relevant to comparing a sentence with its correction.

Transformer-tiny is the baseline trained on RONACC alone. Transformer-base keeps the standard larger architecture, including the dimensions and learning-rate schedule associated with that design. The dictionary for the larger system has 32,768 word pieces constructed from the entire artificial corpus. The authors report that the embedding parameters are separate rather than shared across layers. They use Adam to adjust the parameters in both architectures, with a learning-rate warm-up schedule. The learning rate controls the scale of the updates, and warm-up raises it during the early part of training.

For Transformer-base, pretraining means reconstructing the Wikipedia originals from the artificial inputs. The paper specifies a development portion of 3% of the artificial corpus and describes monitoring the development loss during pretraining. This development portion belongs to the synthetic stage. It is separate from the RONACC development portion, which comes from the broadcast and written correction pairs. Performance on reconstruction can show whether the larger system is learning the synthetic task. The gold corpus is what lets the authors check whether the procedure transfers to the corrections of interest.

Continue training on RONACC

After pretraining, the authors try two ways to begin the gold-corpus stage. In both, Transformer-base retains the parameters it learned on the synthetic pairs. All layers can still change as it trains on RONACC. The comparison concerns the state of the optimizer, the mechanism that converts the training signal into updates to those parameters.

In the setting the paper calls retraining, the authors reset the optimizer and its learning rate before continuing on RONACC. Adam begins the new stage with fresh state. In the setting called fine-tuning, the optimizer state and learning rate carry over. The names refer to these particular experimental choices. In ordinary usage, both procedures adapt a pretrained system by continuing to train it on a target dataset.

There is a reason to try both. Resetting the optimizer gives training a fresh start at a point when the errors and the kinds of sentences have changed. With limited gold data, it may also make it easier for the system to move too far from parameters that worked during the first stage. Continuing with the existing optimizer preserves more continuity in how updates are applied. That continuity could be helpful if the artificial task was well aligned with the correction corpus, or it could make adaptation too weak if the new data calls for substantial changes. The paper tests which tradeoff works better on RONACC.

Generate and rank candidate corrections

At inference time, beam search keeps several promising output sequences in play as the decoder extends them. The paper sets the beam size to 8 in all decoding experiments. Holding several alternatives allows a locally attractive piece of a sentence to compete with another continuation whose value becomes clearer later. The authors select the beam width as a compromise between speed and accuracy.

The paper tests the usual beam scoring, length normalization, and reranking with an external language model. Length normalization adjusts how the sequence score depends on output length. This is relevant when a legitimate edit adds or removes material. A change in the number of output tokens can come from an appropriate correction as well as from an error in generation. The experiment checks whether changing the treatment of length alters the resulting benchmark score.

For reranking, the authors build a Kneser–Ney smoothed n-gram language model with KenLM from 30 million filtered Wikipedia sentences. It is a 5-gram system, meaning that its estimates use local sequences of words within a window of that order. Smoothing lets it give useful probabilities when a particular sequence was infrequent or absent in the training counts. During reranking, its normalized sentence score supplies an additional preference among the candidate revisions. The paper gives that score and the beam score equal weight, with each weight fixed to 1.

The beam score has access to the source and expresses which output the encoder and decoder prefer for it. The external score favors a candidate according to the patterns it learned from Romanian Wikipedia. A sentence can receive a favorable external score while making a less faithful correction to the particular input. Conversely, among otherwise plausible revisions, the external score might favor the one whose local word combinations are more typical. This is a scoring experiment applied to the candidates the beam already found.

Compare predicted repairs with the reference

ERRANT aligns each original in RONACC with its reference revision and separately aligns that same original with the system prediction. A predicted edit found among the reference edits is a true positive. A predicted edit without a reference match is a false positive. A reference edit absent from the prediction is a false negative. Because both sets of edits refer back to the original, the comparison can identify repairs at the relevant location as well as the words involved.

The resulting precision and recall answer different questions. Precision describes the fraction of proposed edits that match the reference. Recall describes the fraction of reference edits that the system recovers. A cautious system can have good precision while leaving a substantial amount of work for the reader. A system that makes more changes can recover more reference edits while also proposing revisions that the reference gives no support for.

The paper combines the two measures using F₀.₅. The conventional expression for the score can be written as follows.

Fᵦ = (1 + β²) × P × R / (β² × P + R)

Fᵦ is the combined score with weighting parameter β, which is 0.5 for the paper’s evaluation. P denotes edit precision and R denotes edit recall. The superscript ² squares β. A plus sign adds terms, × multiplies them, and the slash divides the product on the left by the parenthesized quantity that follows. The constant 1 is the unit term in the weighting factor. At the selected value of β, precision has greater influence on the score, reflecting the authors’ preference for suggesting corrections when there is good reason to make them.

This is why the authors prefer edit scoring to a measure such as BLEU for this experiment. In translation, overlap with a reference can help measure whether appropriate words and word sequences have been generated. In correction, much of that overlap is available by copying the original. The edit comparison focuses attention on the decisions that distinguish a corrector from a system that simply returns the text it received.

The authors make the Romanian ERRANT adaptation, the synthetic pairs, the correction resources, and the trained systems available through their repository. The release also includes the KenLM language-model resource in ARPA format. Together these resources cover both sides of the experiment. A correction system can be trained or examined using the released material, and its proposed sentence revisions can be converted into edits using the adaptation developed for Romanian.

Experiments and results

The benchmark and the main comparison

RONACC is the benchmark for the reported correction scores. Its training, development, and test partitions retain the three groups of examples, so that written material and the two kinds of broadcast material can be examined separately. The artificial Wikipedia pairs supply pretraining data for Transformer-base. That distinction matters when interpreting the headline scores. They express agreement with corrections in RONACC, rather than success at reconstructing the originals in the synthetic corpus.

Transformer-tiny provides the gold-only baseline. The paper reports that it trained in a few hours on an NVidia GTX 1050. This baseline answers a practical question. Given the new correction corpus and a small encoder–decoder system, how much reference-matching correction can be learned directly from the corpus? The larger system answers a different question about the overall pipeline. It uses an architecture with more capacity, learns the artificial correction task, and then continues training on RONACC. The headline comparison puts these two complete approaches beside each other.

Gold-only baseline and best pretrained system on RONACC, F₀.₅

The larger Transformer trained first on synthetic errors and then on gold corrections has the higher edit score.

Gold-only baseline and best pretrained system on RONACC, F₀.₅Transformer-tiny, trained on RONACC: 44.38Transformer-tiny, trained on RONACC44.38Transformer-base, pretrained and fine-tuned (this paper): 53.76Transformer-base, pretrained andfine-tuned (this paper)53.76
The numbers
System or settingF₀.₅
Transformer-tiny, trained on RONACC44.38
Transformer-base, pretrained and fine-tuned (this paper)53.76

The baseline reaches 44.38 F₀.₅ on RONACC. The best Transformer-base configuration reaches 53.76 after synthetic pretraining and fine-tuning. The result shows that the authors’ full training approach improves the edit score over their small, gold-only system. The scores are aggregates over proposed and reference edits. A gain can result from recovering more of the editor’s changes, making fewer unsupported changes, or a combination of the two. It can also coexist with failures on particular kinds of input.

The paper reports that the baseline’s precision is comparable to that of the fine-tuned system. Its F₀.₅ is also similar to that of the larger retrained system. This helps put the larger system’s result into perspective. Transformer-tiny is already able to make reasonably selective edits with RONACC alone. The larger system’s advantage depends on how the additional training is carried into the gold-corpus stage. A bigger architecture and access to artificial examples can produce a strong result, with the adaptation procedure influencing how much of that advantage appears in the final score.

Broadcast sentences and written sentences behave differently

The authors break down their baseline and fine-tuned results across the RONACC groups. W-sentences shows the largest F₀.₅ improvement over the baseline. This is the group intended to capture written mistakes, and it includes Wikipedia material. The synthetic targets are likewise drawn from Wikipedia. The authors suggest that similarity in language use is a reason for the stronger transfer. Training on edited prose can provide useful examples of the vocabulary, sentence patterns, and contextual cues that a corrector encounters in the written group.

NAC-sentences shows the smallest gain from the pretrained approach and has the lowest F₀.₅ for both systems. These are complete sentences from broadcasts, so an explanation that depends only on input length or the absence of a verb would miss the point. Some reference edits replace a noun because the original is considered unidiomatic or insufficiently formal. A replacement based on the role the noun plays in the sentence can require a different response from the spelling and word-order operations used by the artificial generator.

The NAC-phrases group supplies another test of transfer. These broadcast examples lack a verb, even though the authors judge them to contain enough information for the required repair. Much of the synthetic data has been screened to look like complete Wikipedia prose. A phrase can still share the kinds of word-ending, spelling, or spacing problems that pretraining teaches. It offers a different surrounding structure in which to use that training. The paper’s discussion also identifies informal vocabulary as a difficulty in both broadcast groups.

This group comparison gives the aggregate result a more precise interpretation. The stronger system transfers most successfully to the part of the gold corpus whose language overlaps most clearly with the synthetic source. The group labels also bundle several properties. The written and broadcast examples can differ in vocabulary, tone, sentence structure, and editorial target. The difference in scores consequently shows where the method works best within RONACC, while the explanation about source similarity remains an interpretation of the pattern.

What successful and unsuccessful edits look like

The paper gives a spelling example in which the system changes ultimile to ultimele. The edited word keeps the meaning of the original while using the intended form. Such an edit fits the synthetic training setup well. The generator has taught the system to reconstruct words from close alternatives and character-level distortions. Whether a specific prediction was learned from a particular generated operation cannot be traced from the example, but the shape of the task is shared.

The change from oameni to oamenii illustrates a more grammatical use of letter-level evidence. The extra i participates in the distinction involving the definite form of the plural noun. The correction is visually small, while the choice depends on what the noun is doing in context. The paper reports that the system generally handles this Romanian difficulty well in its examples. This is one reason a corrector needs more than a check that each word resembles a plausible spelling.

Hyphenation is another place where the correction depends on how written forms express a grammatical relationship. The paper uses să-l and săl to illustrate the decision. Its examples suggest that the system can frequently add or remove a hyphen as the context requires. Handling these cases means learning when a visible boundary is justified, including cases in which a superficially similar form would call for a different treatment.

Word order offers a contrasting failure mode in the results. The reference can prefer ne mai where the input contains mai ne, yet the system sometimes leaves the source order in place. This matters because the training generator explicitly includes swaps. The presence of a swap operation gives practice at undoing local displacements. Reliable correction of a particular Romanian construction still depends on having enough evidence about which order is required and when it is required.

Other failures involve a change the system actively makes. Faced with the English word tricks inside a Romanian example, it produces a Romanian noun with similar characters in place of a word that would convey the intended meaning. A similar pattern appears in the substitution of a form of a vota, meaning to vote, for a form of a voma, meaning to vomit. The authors describe the original in the latter case as acceptable, albeit informal. These examples expose the cost of getting the decision to intervene wrong. An output can look like clean Romanian while expressing something different from what the speaker said.

What the ablations show

Keeping the optimizer state helps the final correction task

The closest comparison to an ablation is between the two ways of continuing training from the pretrained Transformer-base. The correction architecture and pretraining strategy are shared, and both procedures allow all layers to update on RONACC. The intervention is the reset applied in the retraining setting. Fine-tuning carries the optimizer parameters and learning rate forward. This gives the comparison a more focused interpretation than the headline contrast between Transformer-tiny and Transformer-base.

The paper reports an advantage of 8 points in RONACC F₀.₅ for fine-tuning over retraining. It attributes most of this difference to precision. The advantage therefore comes chiefly from the stronger reliability of the proposed edits under the metric, rather than simply from a larger number of revisions. This fits the idea that the point of transition matters when the small gold corpus follows a much larger artificial one. The system has already learned a particular way of updating its parameters during correction training, and keeping that state yields better predictions in this experiment.

The comparison evaluates the optimizer reset and the learning-rate reset together. It leaves open how much of the result comes from either component, or from their interaction. The paper discusses forgetting and overfitting as risks with a fresh optimizer state, and weak adaptation as a risk with retained state. The reported precision result is consistent with the retained state being advantageous for this schedule and corpus. It does not measure how much pretraining knowledge each system retained during the transition.

The extra sentence score usually hurts

The reranking experiments test whether a second score can choose a better revision from the beam. The authors find that language-model reranking generally reduces the overall correction score. The exception is the system trained only on the artificially generated sentences. For the configurations already adapted to RONACC, the additional preference learned from Wikipedia typically makes the output agree less closely with the gold edits.

That direction is understandable given the signals the two scores use. The system’s beam scores a candidate in relation to the original sentence. The external model scores local patterns in the candidate itself. If every beam candidate preserves the same meaning, greater fluency could help distinguish them. If a candidate with familiar phrasing introduces an unnecessary word change, scoring its fluency may move it ahead of a more faithful candidate. This account explains how reranking could hurt, while the reported results establish the direction of the effect under the tested weights.

The authors suggest two reasons for the outcome. They consider the external model’s 30 million sentences a limited training collection for the reranking job. They also report that they lacked the hardware resources for a grid search over the two weights and therefore fixed each to 1. The experiments do not vary these conditions in a way that separates their effects. They show that equal-weight reranking with the released 5-gram resource usually worsened the benchmark result, and that the synthetic-only system responded differently from the systems trained on gold corrections.

Length normalization gives a smaller effect. The authors report that it does not materially change the scores. This comparison tests the method of scoring output length under the chosen beam and systems. The paper also reports no improvement from a baseline trial with dropout set to 0.3. Dropout randomly suppresses some of the information available during training as a form of regularization. This trial gives information about that setting. The authors separately identify suppressing entire source embeddings as a possible extension, which would target a different unit of information.

Corpus analysis suggests where the transfer comes from

The authors compare the distribution of ERRANT edits in the synthetic pairs and RONACC. The broad resemblance makes it plausible that synthetic correction gives relevant practice. The finer breakdown shows why this resemblance is incomplete. The synthetic collection has a lower contribution from FORM edits, a greater share of NOUN edits, and a smaller share of PUNCT edits. A system pretrained on those examples encounters a different balance between keeping a lexical item and correcting its form, replacing the item, and adjusting punctuation.

The authors suggest that the smaller share of FORM edits can make the corrector less conservative with word forms. A corpus dominated by examples that replace whole words gives a learner a different picture of what counts as a repair from a corpus rich in changes within the forms of a lemma. They also suggest that the lower share of punctuation changes is less serious because such corrections are relatively simple. Those interpretations come from the corpus comparison. The paper does not test generators that independently change the prevalence of each category and then measure the resulting corrections.

The RONACC group results add evidence about the relevance of the source text. The written group gains most, the complete broadcast sentences least. This agrees with the authors’ expectation that Wikipedia-derived practice transfers more directly to examples with similar language. It remains an analysis across groups of examples. To make the comparison controlled, one would vary a feature of the synthetic source and keep both the target corpus and all other parts of the pipeline constant. The paper gives the observed pattern and uses it to motivate closer matching between the generated examples and the broadcast inputs.

Finally, the prediction examples clarify what an overall improvement can contain. Repairing an ending or a hyphen demonstrates the ability to use quite local information. Leaving an awkward order unchanged shows a missed edit. Replacing appropriate informal language with an unrelated familiar word shows an unwarranted intervention. These outcomes all matter to edit scoring, but they have different causes and consequences in use. The paper’s examples identify concrete behaviors behind the score without measuring the frequency of each behavior across the corpus.

Limitations

Limits identified by the authors

The authors identify a mismatch between the language of the synthetic targets and the language of the broadcast groups. Wikipedia offers well-formed prose, while broadcasts can include informal expressions and phrases with no verb. A corrector exposed mainly to formal writing can treat a valid conversational form as suspicious. The paper’s example involving the verbs for vomiting and voting shows a substitution that changes meaning. More instances of correctly written informal language could give an encoder and decoder evidence that such expressions belong in the output. The authors also propose using phrases without verbs to bring the synthetic inputs closer to NAC-phrases.

Another limit is the difficulty of correcting word choice. Some broadcast references change a noun because its use is unidiomatic or because the expression is insufficiently formal. A generator that emphasizes spelling resemblance and local corruption can create many problems with an identifiable reversal. It has fewer reasons to create a sentence that sounds possible but uses a word in an inappropriate sense or register. The authors describe these non-idiomatic mistakes as an open problem for correction with small corpora. They suggest including English words in training material in response to errors on English vocabulary embedded in Romanian.

Diacritics remain a problem even for the best system. According to the paper, about a third of the words in regular Romanian texts have one or more diacritics. The Wikipedia filters favor natural targets in which diacritics occur, and RONACC includes examples of mistakes involving them. Nonetheless, the authors report that the strongest system still fails to handle this class adequately. They propose generating further training pairs by removing diacritics from text, producing inputs in which the intended marked letters are known from the original. This would give the corrective task direct examples of a behavior that general character corruption may teach only incidentally.

The paper also points to Romanian’s richer word-form system compared with English. Methods borrowed from English correction can help, as the main experiment shows, while leaving some Romanian morphological distinctions poorly represented. The authors propose examining methods designed for languages with rich morphology. They also propose adjusting the synthetic error rates so that ERRANT categories resemble their distribution in RONACC more closely. Improving the match in these distributions and improving how the system represents related word forms are distinct avenues discussed by the authors.

The attempted use of BERT has a narrower scope than the main experiment. The authors tried a pretrained BERT encoder with frozen weights and found the performance too poor to include in the final comparisons. A frozen encoder can give similar representations to a wrong word and its intended replacement, reducing the information the decoder has to work with. The paper also discusses the risk of losing useful pretrained behavior when adapting BERT as part of a sequence-to-sequence system. It points to prior work that adapts BERT through error detection as an approach still to examine for Romanian.

Limits of the experimental comparison

The headline comparison changes architecture size and access to synthetic training together. Transformer-tiny uses RONACC alone, and the successful Transformer-base configuration is larger and pretrained. The score difference supports the effectiveness of the authors’ complete approach under the benchmark conditions. It leaves the separate contributions of capacity, vocabulary, and artificial training unresolved. A gold-only result for the larger architecture or a pretrained result for the smaller one would be needed to attribute a specific part of the gain to one factor while holding the other fixed.

The paper also gives inconsistent counts for the small architecture. It describes Transformer-tiny as having approximately 1.5 mil parameters in one passage and approximately 15k parameters in another. The latter passage discusses the comparison with the larger architecture and the effect of vocabulary size, but the two statements do not establish a single total for the baseline. Its identity as the smaller, gold-only system and its reported correction score are clear. An exact parameter comparison cannot be recovered from those descriptions.

The synthetic procedure leaves some implementation details open. A rate drawn from the stated normal distribution can be negative or high enough to request more selections than there are words. Sampling without replacement requires a valid count, and the paper does not explain how out-of-range draws are handled. It also gives a less specific account of the choices used to generate individual character replacements than of the Aspell word substitutions. The release of the generated pairs provides the data used for pretraining. Regenerating the same distribution from the prose alone would require resolving those choices.

The split-specific reporting is also limited. The authors give the RONACC train, development, and test proportions, report the headline scores for the corpus, and describe how the group results compare. The result discussion gives no separate development and test scores for the headline systems, nor does it quantify variation over repeated training runs. The direction of the reported comparison is clear. The paper gives less evidence about the variability of the margin or the precision of comparisons described as similar.

Matching ERRANT edits is an operational definition of success. It permits both systems to be counted on the same terms and makes proposed changes visible. It also depends on how the aligner splits or merges edits and on what the reference correction records. If a revision repairs the same problem using different wording or a different span, it may receive no credit under matching against the recorded edit. The paper’s discussion of multiple references in JFLEG makes this especially relevant to the more open-ended choices in RONACC, including how to repair awkward or informal wording.

The group results concern this particular benchmark. The corpus represents native Romanian from selected television and radio material together with examples chosen to resemble written mistakes. Phrases have enough local information for a reference repair. The experiment therefore leaves open performance on text requiring a previous sentence, on other sources or registers of Romanian, and on material written by Romanian learners. The subgroup with the strongest gain overlaps the setting of the pretraining source, which makes it especially important to distinguish transfer within RONACC from reach across other kinds of text.

The method is presented as readily adaptable across languages. The Romanian implementation nonetheless depends on a usable text source, a spellchecker that can supply plausible confusions, and an evaluation toolkit adapted to the target language. The paper’s reliance on Aspell for word substitutions makes the quality of those suggestions relevant to what the generator can teach. A part-of-speech tagger helps with the linguistic analysis, while dictionaries, editorial norms, and written conventions influence the rest of the pipeline. The experiments demonstrate a Romanian implementation of the general strategy and give no cross-language comparison of this particular implementation.

What came after

The later citation comes from a survey on the use of large language models in education. It places the Romanian paper in a broader body of work concerned with language technology and educational applications. The citation establishes that the Romanian correction study entered that discussion. The survey’s stated scope gives no basis for attributing a new Romanian benchmark, use of the RONACC data, replication of the synthetic-error experiment, or an improvement on the reported F₀.₅ score to it. Large language models for education: A survey and outlook

Cite

Cite as Teodor-Mihai Cotet, Ştefan Ruşeţi and Mihai Dascălu. 2020. Neural Grammatical Error Correction for Romanian. Proceedings - International Conference on Tools with Artificial Intelligence, TAI.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/ictai50040.2020.00101 · arXiv 2604.23627

@inproceedings{cotet2020neural,
  title = {{Neural Grammatical Error Correction for Romanian}},
  author = {Teodor-Mihai Cotet, Ştefan Ruşeţi and Mihai Dascălu},
  booktitle = {Proceedings - International Conference on Tools with Artificial Intelligence, TAI},
  year = {2020},
  doi = {10.1109/ictai50040.2020.00101},
  eprint = {2604.23627},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/ictai50040.2020.00101}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/cotet-2020-neural-grammatical-error-correction-romanian/

References

30 references, from the paper's own bibliography.

  1. Hwee Tou Ng, Siew Mei Wu, Ted Briscoe, Christian Hadiwinoto, Raymond Hendy Susanto, Christopher Bryant. 2014. The CoNLL-2014 shared task on grammatical error correction. Proceedings of the Eighteenth Conference on Computational Natural Language Learning: Shared Task. OpenAlex ↗ · Scholar ↗
  2. Courtney Napoles, Keisuke Sakaguchi, Joel Tetreault. 2017. JFLEG: A fluency corpus and benchmark for grammatical error correction. arXiv preprint arXiv:1702.04066. OpenAlex ↗ · Scholar ↗
  3. Mariano Felice, Christopher Bryant, Edward Briscoe. 2016. Automatic extraction of learner errors in ESL sentences using linguistically enhanced alignments. OpenAlex ↗ · Scholar ↗
  4. Christopher Bryant, Mariano Felice, Edward Briscoe. 2017. Automatic annotation and evaluation of error types for grammatical error correction. our card
  5. Wajdi Zaghouani, Behrang Mohit, Nizar Habash, Ossama Obeid, Nadi Tomeh, Alla Rozovskaya, Noura Farra, Sarah Alkuhlani, Kemal Oflazer. 2014. Large scale Arabic error annotation: Guidelines and framework. Carnegie Mellon University. our card
  6. Adriane Boyd. 2018. Using wikipedia edits in low resource grammatical error correction. Proceedings of the 2018 EMNLP Workshop W-NUT: The 4th Workshop on Noisy User-generated Text. our card
  7. Alla Rozovskaya, Dan Roth. 2019. Grammar error correction in morphologically rich languages: The case of Russian. Transactions of the Association for Computational Linguistics. our card
  8. Jakub N\'aplava. 2017. Natural language correction. Univerzita Karlova, Matematicko-fyzik\'aln\'\i fakulta. OpenAlex ↗ · Scholar ↗
  9. Liang-Chih Yu, Lung-Hao Lee, Li-Ping Chang. 2014. Overview of grammatical error diagnosis for learning Chinese as a foreign language. Proceedings of the 1st Workshop on Natural Language Processing Techniques for Educational Applications. OpenAlex ↗ · Scholar ↗
  10. Tomoya Mizumoto, Mamoru Komachi, Masaaki Nagata, Yuji Matsumoto. 2011. Mining revision log of language learning SNS for automated Japanese error correction of second language learners. Proceedings of 5th International Joint Conference on Natural Language Processing. OpenAlex ↗ · Scholar ↗
  11. Jakub N\'aplava, Milan Straka. 2019. Grammatical Error Correction in Low-Resource Scenarios. arXiv preprint arXiv:1910.00353. OpenAlex ↗ · Scholar ↗
  12. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, \Lukasz Kaiser, Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems. our card
  13. Roman Grundkiewicz, Marcin Junczys-Dowmunt, Kenneth Heafield. 2019. Neural grammatical error correction systems with unsupervised pre-training on synthetic data. Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications. OpenAlex ↗ · Scholar ↗
  14. Christopher Bryant, Mariano Felice, \Oistein E Andersen, Ted Briscoe. 2019. The BEA-2019 shared task on grammatical error correction. Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications. our card
  15. Marcin Junczys-Dowmunt, Roman Grundkiewicz. 2016. Phrase-based machine translation is state-of-the-art for automatic grammatical error correction. arXiv preprint arXiv:1605.06353. OpenAlex ↗ · Scholar ↗
  16. Ziang Xie, Anand Avati, Naveen Arivazhagan, Dan Jurafsky, Andrew Y Ng. 2016. Neural language correction with character-based attention. arXiv preprint arXiv:1603.09727. our card
  17. Marcin Junczys-Dowmunt, Roman Grundkiewicz, Shubha Guha, Kenneth Heafield. 2018. Approaching neural grammatical error correction as a low-resource machine translation task. arXiv preprint arXiv:1804.05940. OpenAlex ↗ · Scholar ↗
  18. Wei Zhao, Liang Wang, Kewei Shen, Ruoyu Jia, Jingming Liu. 2019. Improving grammatical error correction via pre-training a copy-augmented architecture with unlabeled data. arXiv preprint arXiv:1903.00138. OpenAlex ↗ · Scholar ↗
  19. Shun Kiyono, Jun Suzuki, Masato Mita, Tomoya Mizumoto, Kentaro Inui. 2019. An Empirical Study of Incorporating Pseudo Data into Grammatical Error Correction. arXiv preprint arXiv:1909.00502. our card
  20. Masahiro Kaneko, Masato Mita, Shun Kiyono, Jun Suzuki, Kentaro Inui. 2020. Encoder-Decoder Models Can Benefit from Pre-trained Masked Language Models in Grammatical Error Correction. arXiv preprint arXiv:2005.00987. OpenAlex ↗ · Scholar ↗
  21. Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. our card
  22. Christopher Bryant, Ted Briscoe. 2018. Language model based grammatical error correction without annotated training data. Proceedings of the thirteenth workshop on innovative use of NLP for building educational applications. OpenAlex ↗ · Scholar ↗
  23. Jared Lichtarge, Chris Alberti, Shankar Kumar, Noam Shazeer, Niki Parmar, Simon Tong. 2019. Corpora generation for grammatical error correction. arXiv preprint arXiv:1904.05780. OpenAlex ↗ · Scholar ↗
  24. Zheng Yuan, Mariano Felice. 2013. Constrained grammatical error correction using statistical machine translation. Proceedings of the Seventeenth Conference on Computational Natural Language Learning: Shared Task. OpenAlex ↗ · Scholar ↗
  25. G. Gutu, M. Dascalu, S. Trausan-Matu, P. Dessus. 2016. ReaderBench goes Online: A Comprehension-Centered Framework for Educational Purposes. International Conference on Human-Computer Interaction (RoCHI 2016). OpenAlex ↗ · Scholar ↗
  26. Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, others. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144. OpenAlex ↗ · Scholar ↗
  27. Kenneth Heafield, Ivan Pouzyrevsky, Jonathan H Clark, Philipp Koehn. 2013. Scalable modified Kneser-Ney language model estimation. Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). our card
  28. Kishore Papineni, Salim Roukos, Todd Ward, Wei-Jing Zhu. 2002. BLEU: a method for automatic evaluation of machine translation. Proceedings of the 40th annual meeting on association for computational linguistics. our card
  29. Jinhua Zhu, Yingce Xia, Lijun Wu, Di He, Tao Qin, Wengang Zhou, Houqiang Li, Tie-Yan Liu. 2020. Incorporating bert into neural machine translation. arXiv preprint arXiv:2002.06823. OpenAlex ↗ · Scholar ↗
  30. Dan Tufi\cs, Alexandru Ceau\csu, others. 2008. DIAC+: A professional diacritics recovering system. Proceedings of LREC 2008. OpenAlex ↗ · Scholar ↗