SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.03260 · EMNLP · 2020

Improving the Efficiency of Grammatical Error Correction with Erroneous Span Detection and Correction

Ming Zhou, Tao Ge, Furu Wei, Xingxing Zhang, Mengyun Chen

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2010.03260.json · badge: /api/ran/2010.03260.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
chrisjbryant/errant canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
evaluate_edits Ran
ran on a synthesized input
chrisjbryant/errant/errant/commands/compare_m2.py
code served (permissive licence) · get_code("3698fdd4f299cefc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

class Args:
    def __init__(self):
        self.verbose = False
        self.beta = 1.0

# Construct hyp_dict and ref_dict
# These map hypothesis/reference IDs to edit dictionaries
# Each edit dictionary maps edit positions to (category, details)
hyp_dict = {
    0: {
        1: ['grammar', 'detail1'],
        2: ['spelling', 'detail2']
    },
    1: {
        1: ['grammar', 'detail1'],
        3: ['punctuation', 'detail3']
    }
}

ref_dict = {
    0: {
        1: ['grammar', 'detail1'],
        2: ['spelling', 'detail2'],
        4: ['noop', 'no_operation']
    },
    1: {
        1: ['grammar', 'detail1'],
        5: ['capitalization', 'detail5']
    }
}

# best tracks cumulative TP, FP, FN
best = {
    'tp': 0,
    'fp': 0,
    'fn': 0
}

sent_id = 1
original_sentence = "This is a test sentence with some errors."

args = Args()

ARGS = {
    'hyp_dict': hyp_dict,
    'ref_dict': ref_dict,
    'best': best,
    'sent_id': sent_id,
    'original_sentence': original_sentence,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_cor_and_edits Ran
ran on a synthesized input
chrisjbryant/errant/errant/commands/m2_to_m2.py
code served (permissive licence) · get_code("862e827e644df108")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Analyze the function to understand what it needs
# - orig: a string that can be split by spaces
# - edits: a list of edit tuples, each containing [start_idx, end_idx, category, correction_string]

ARGS = {
    "orig": "The quick brown fox jumps over the lazy dog",
    "edits": [
        [1, 2, "SPELL", "quicker"],
        [3, 4, "GRAMMAR", "fox"],
        [5, 6, "Um", "jumps"],
        [7, 8, "UNK", "over"],
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_pos_map Ran
ran on a synthesized input
chrisjbryant/errant/errant/en/classifier.py
code served (permissive licence) · get_code("fe5a71988ba49a3d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with POS tag mappings
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("the\tDET\n")
temp_file.write("cat\tNOUN\n")
temp_file.write("in\tADP\n")
temp_file.write("quickly\tADV\n")
temp_file.write("run\tVERB\n")
temp_file.write("Paris\tPROPN\n")
temp_file.write("and\tCCONJ\n")
temp_file.write("or\tCONJ\n")
temp_path = temp_file.name
temp_file.close()

ARGS = {
    'path': temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_word_list Ran
ran on a synthesized input
chrisjbryant/errant/errant/en/classifier.py
code served (permissive licence) · get_code("8070d1ac3fffabbd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with sample words
temp_dir = tempfile.mkdtemp()
word_list_path = os.path.join(temp_dir, "words.txt")

with open(word_list_path, "w") as f:
    f.write("apple\n")
    f.write("banana\n")
    f.write("cherry\n")
    f.write("  date  \n")  # with whitespace to test strip()

ARGS = {
    "path": word_list_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
noop_edit Ran
ran on a synthesized input
chrisjbryant/errant/errant/commands/m2_to_m2.py
code served (permissive licence) · get_code("4a5e05c1a1e02593")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def noop_edit(id=0):
    return 'A -1 -1|||noop|||-NONE-|||REQUIRED|||-NONE-|||' + str(id)

ARGS = {
    'id': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
process_edits Ran
ran on a synthesized input
chrisjbryant/errant/errant/commands/compare_m2.py
code served (permissive licence) · get_code("41f74cee8844bc4e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from argparse import Namespace

# Create a minimal args object with all required attributes
args = Namespace(
    dt=True,  # detection task flag
    ds=False,  # detection span flag
    cse=False,  # case-sensitive error flag
    single=False,  # single token edits only
    multi=False,  # multi-token edits only
    filt=None  # filter categories (None means no filtering)
)

# Create sample edits data structure
# Each edit: [start, end, category, correction, coder_id]
edits = [
    [0, 1, 'SPELL', 'speling', 0],
    [2, 4, 'GRAM', 'grammar', 1],
    [5, 5, 'VERB', 'verbed', 0],
    [-1, -1, 'noop', '-NONE-', 2],
]

ARGS = {
    'edits': edits,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simplify_edits Ran
ran; our contract draft was wrong, not the code
chrisjbryant/errant/errant/commands/compare_m2.py
pointer only (licence: MIT); the stored copy get_code serves, from pygongnlp/PT-M2, is pointer only (licence: NONE) · get_code("a45052c27ec03581")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from pygongnlp/PT-M2, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

simplify_edits Ran
ran on a synthesized input
chrisjbryant/errant/errant/commands/m2_to_m2.py
code served (permissive licence) · get_code("79b5ab8e85e665e2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

def simplify_edits(edits):
    edit_dict = {}
    for edit in edits:
        edit = edit.split('|||')
        span = edit[0][2:].split()
        start = int(span[0])
        end = int(span[1])
        cat = edit[1]
        cor = edit[2]
        id = edit[-1]
        proc_edit = [start, end, cat, cor]
        if id in edit_dict.keys():
            edit_dict[id].append(proc_edit)
        else:
            edit_dict[id] = [proc_edit]
    return edit_dict

torch.manual_seed(0)

# The function expects a list of strings in a specific format
# Format: "S start end|||category|||correction|||...|||id"
edits = [
    "S 0 5|||SPELL|||hello|||doc0",
    "S 10 15|||GRAMMAR|||is|||doc0",
    "S 20 25|||VERB|||running|||doc1",
]

ARGS = {
    "edits": edits
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
process_edits 1 other paper
1 later
2024.findings-acl.148 (2024 (year only))
Alirector: Alignment-Enhanced Chinese Grammatical Error Corrector
simplify_edits 1 other paper
1 later
2211.01635 (2022-11)
Revisiting Grammatical Error Correction Evaluation and Beyond

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We propose a novel language-independent approach to improve the efficiency for Grammatical Error Correction (GEC) by dividing the task into two subtasks: Erroneous Span Detection (ESD) and Erroneous Span Correction (ESC). ESD identifies grammatically incorrect text spans with an efficient sequence tagging model. Then, ESC leverages a seq2seq model to take the sentence with annotated erroneous spans as input and only outputs the corrected text for these spans. Experiments show our approach performs comparably to conventional seq2seq approaches in both English and Chinese GEC benchmarks with less than 50% time cost for inference.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2010.03260")
get_code_for_paper("2010.03260")
have("2010.03260")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2010.03260.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2010.03260.svg)](https://syntology.ai/paper/2010.03260)

Connect an agent — have() is free.