SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.14734 · EMNLP · 2023

Advancements in Arabic Grammatical Error Detection and Correction: An Empirical Investigation

Nizar Habash, Bashar Alhafni, Christian Khairallah, Inoue Go

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 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 13 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2305.14734.json · badge: /api/ran/2305.14734.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
CAMeL-Lab/arabic-gec canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
FunctionStatusWhere it lives
aggregate_score Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/stat_significance/significance.py
code served (permissive licence) · get_code("d92e76fd142eaf2f")
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

# Construct valid arguments for aggregate_score
# The function expects a list of dicts, each containing 'correct', 'proposed', and 'gold' keys

scores = [
    {
        'correct': 5,
        'proposed': 10,
        'gold': 8
    },
    {
        'correct': 3,
        'proposed': 7,
        'gold': 6
    },
    {
        'correct': 4,
        'proposed': 9,
        'gold': 7
    }
]

ARGS = {
    'scores': scores
}
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 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
build_ngrams Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/mle/mle.py
code served (permissive licence) · get_code("fb735fc390a17b4f")
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 list, ndim 2, 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

torch.manual_seed(0)

# Analyzing the function:
# - sentence: list of str (words)
# - pad_right: bool
# - pad_left: bool
# - ngrams: int
# The function builds n-grams from a sentence by slicing and padding with special tokens

ARGS = {
    "sentence": ["the", "quick", "brown", "fox"],
    "pad_right": True,
    "pad_left": True,
    "ngrams": 2,
}
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 list, ndim 2, dtype family float — a list 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
check_en Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/utils/chatgpt_clean.py
code served (permissive licence) · get_code("7dd4861d3c021f66")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 re

torch.manual_seed(0)

# The function check_en takes a parameter 'data' which is iterated over
# Each element in data is passed to txt in the list comprehension
# It expects strings (text) that can be searched with regex for English characters
# The function finds the sequence with the longest count of English characters

data = [
    "Hello world",
    "Привет мир with some English",
    "abc123def456",
    "NoEnglishHere"
]

ARGS = {
    "data": data
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
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
featurize_ged Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/generate.py
code served (permissive licence) · get_code("ce2c1d18637e5547")
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 list, 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
from unittest.mock import MagicMock

# Define a minimal tokenizer mock that implements the methods called in featurize_ged
class MockTokenizer:
    def __init__(self):
        self.bos_token_id = 101
        self.eos_token_id = 102
        self.pad_token_id = 0
    
    def tokenize(self, word):
        # Return subword tokens - some words get multiple tokens
        if word == "hello":
            return ["hel", "lo"]
        elif word == "world":
            return ["world"]
        elif word == "test":
            return ["test"]
        else:
            return [word]
    
    def convert_tokens_to_ids(self, tokens):
        # Simple token to id conversion
        token_to_id = {
            "hel": 1, "lo": 2, "world": 3, "test": 4,
            "hello": 1, "world": 3
        }
        return [token_to_id.get(t, 5) for t in tokens]

# Create test inputs and labels
inputs = [
    "hello world",
    "test sentence"
]

labels = [
    "UC DELETE",
    "UC UC"
]

# Create a label map
label_map = {
    'UC': 0,
    'DELETE': 1,
    'MERGE-B': 2,
    'MERGE-I': 3,
    '<pad>': 4
}

# Create tokenizer
tokenizer = MockTokenizer()

# Set up ARGS dictionary with all parameters
ARGS = {
    "tokenizer": tokenizer,
    "inputs": inputs,
    "labels": labels,
    "label_map": label_map,
    "is_t5": False,
    "do_preprocess": False
}
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 list, ndim 1, dtype family float — a list 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_best_checkpoint_gec Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/utils/get_best_checkpoint.py
code served (permissive licence) · get_code("b5db330985ffff36")
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 os
import tempfile
import shutil

# Create a temporary directory structure with checkpoint files
temp_dir = tempfile.mkdtemp()

# Create a checkpoint subdirectory
checkpoint_dir = os.path.join(temp_dir, 'checkpoint-1')
os.makedirs(checkpoint_dir, exist_ok=True)

# Create the evaluation file with the expected format
# The function reads line [3] (4th line) and takes the last element
eval_file_path = os.path.join(checkpoint_dir, 'zaebuc_dev.preds.oracle.txt.m2')
with open(eval_file_path, 'w') as f:
    f.write('line 1\n')
    f.write('line 2\n')
    f.write('line 3\n')
    f.write('metric1 metric2 f_score: 0.85\n')

# Also create an eval file in the root model_path
root_eval_file = os.path.join(temp_dir, 'zaebuc_dev.preds.oracle.txt.m2')
with open(root_eval_file, 'w') as f:
    f.write('line 1\n')
    f.write('line 2\n')
    f.write('line 3\n')
    f.write('metric1 metric2 f_score: 0.90\n')

ARGS = {
    'model_path': temp_dir
}
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, 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_labels Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/run_gec.py
code served (permissive licence) · get_code("4d20815eb1620a67")
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 list, 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 tempfile
import os

# Create a temporary file with labels
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt', encoding='utf8')
temp_file.write('LABEL1\n')
temp_file.write('LABEL2\n')
temp_file.write('UNK\n')
temp_file.write('LABEL3\n')
temp_file.close()

ARGS = {
    'labels_path': temp_file.name
}
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 list, ndim 1, dtype family float — a list 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
is_model_tag Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/mle/mle.py
code served (permissive licence) · get_code("7660d57e1bcceb88")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

# Analyze the function:
# - is_model_tag takes two parameters: tag (string) and mode (string with default 'full')
# - tag is compared against strings like 'UC', 'MERGE', 'UNK', 'DELETE'
# - tag is checked if it contains '+' and compared against tag_combs lists
# - mode is used to select which tag_combs list to use
# - The function returns a boolean

# Test case 1: Valid model tag with full mode
tag_1 = 'REPLACE_OH+REPLACE_OM'
mode_1 = 'full'

# Test case 2: Valid model tag with simple mode
tag_2 = 'REPLACE_O+REPLACE_X'
mode_2 = 'simple'

# Test case 3: Invalid tag (UC)
tag_3 = 'UC'
mode_3 = 'full'

# Test case 4: Single valid tag (no '+')
tag_4 = 'SOME_VALID_TAG'
mode_4 = 'full'

# Test case 5: Invalid combination not in tag_combs
tag_5 = 'REPLACE_XX+REPLACE_YY'
mode_5 = 'full'

ARGS = {
    'tag': 'REPLACE_OH+REPLACE_OM',
    'mode': 'full'
}
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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
load_scores Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/stat_significance/significance.py
code served (permissive licence) · get_code("b7aecf3e97533ea9")
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 list, 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 json
import tempfile
import os

# Create a temporary file with JSON lines format
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "scores.jsonl")

# Write some sample JSON lines to the file
with open(temp_file, 'w') as f:
    f.write(json.dumps({"score": 0.95, "id": 1}) + "\n")
    f.write(json.dumps({"score": 0.87, "id": 2}) + "\n")
    f.write(json.dumps({"score": 0.72, "id": 3}) + "\n")

ARGS = {
    "path": temp_file
}
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 list, ndim 1, dtype family float — a list 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
paired_ar_test Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/stat_significance/significance.py
code served (permissive licence) · get_code("a5bd2eb7522c6cc9")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 random

# Create sample m2 metric score dicts
# Each score dict needs: 'correct', 'proposed', 'gold' keys
def create_sample_scores(num_samples=5):
    """Create sample m2 scorer metric dictionaries"""
    scores = []
    for i in range(num_samples):
        score = {
            'correct': random.randint(5, 15),
            'proposed': random.randint(15, 30),
            'gold': random.randint(15, 30),
        }
        scores.append(score)
    return scores

# Set seed for reproducibility
random.seed(12345)

# Create two sets of scores for the two systems
system1_scores = create_sample_scores(num_samples=5)
system2_scores = create_sample_scores(num_samples=5)

ARGS = {
    'system1_scores': system1_scores,
    'system2_scores': system2_scores,
    'n_trials': 100,
    'seed': 12345,
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
postprocess_src_ged Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/mle/data_utils.py
code served (permissive licence) · get_code("a8cec3d76376377c")
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 2, 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

def project_span(word, tag):
    if 'MERGE' not in tag:
        return (word.split(), [tag for _ in range(len(word.split()))])
    return (word.split(), ['MERGE-B'] + ['MERGE-I' for _ in range(len(word.split()) - 1)])

def postprocess_src_ged(src_tokens, ged_tags):
    """
    1) Replaces out-of-set tag combinations with UNK.
    2) Projects a tag on a span of tokens.
    This is important because we need to deal with a single source
    token at a time.
    """
    tag_combs = ['REPLACE_OH+REPLACE_OM', 'REPLACE_OH+REPLACE_OT', 'REPLACE_OD+REPLACE_OR', 'REPLACE_OD+REPLACE_OG', 'REPLACE_XC+REPLACE_XN', 'REPLACE_OA+REPLACE_OH', 'REPLACE_OM+REPLACE_OR', 'REPLACE_OH+REPLACE_XC', 'REPLACE_OD+REPLACE_OH', 'REPLACE_XC+REPLACE_XG', 'REPLACE_MI+REPLACE_OH', 'REPLACE_OA+REPLACE_OR', 'REPLACE_OR+REPLACE_OT', 'REPLACE_OD+REPLACE_OM']
    assert len(src_tokens) == len(ged_tags)
    ged_tags_ = []
    src_tokens_ = []
    for token, tag in zip(src_tokens, ged_tags):
        if '+' in tag and tag not in tag_combs or tag == 'UNK':
            tag = 'UNK'
        words, tags = project_span(token, tag)
        src_tokens_ += words
        ged_tags_ += tags
    return (src_tokens_, ged_tags_)

# Test data construction
src_tokens = [
    "hello",
    "world",
    "test+invalid",
    "merge_me"
]

ged_tags = [
    "REPLACE_OH",
    "REPLACE_OM",
    "REPLACE_XC+REPLACE_XN",
    "MERGE"
]

ARGS = {
    "src_tokens": src_tokens,
    "ged_tags": ged_tags
}
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 2, 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
preprocess Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/generate.py
code served (permissive licence) · get_code("f082616f91f7e832")
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 2, 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

torch.manual_seed(0)

# Construct valid arguments for the preprocess function
# The function takes two parameters: words (list of strings) and labels (list of strings)

words = [
    "hello",
    "world",
    "foo",
    "bar",
    "baz",
    "qux"
]

labels = [
    "MERGE-B",
    "MERGE-I",
    "UC",
    "DELETE",
    "MERGE-B",
    "MERGE-I"
]

ARGS = {
    "words": words,
    "labels": labels
}
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 tuple, ndim 2, 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
project_span Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/mle/data_utils.py
code served (permissive licence) · get_code("6a8b5c4ecd1a9ab0")
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 2, 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

torch.manual_seed(0)

# Analyze the function: project_span(word, tag)
# - word: a string that gets split() called on it
# - tag: a string that gets checked for 'MERGE' substring

# Create valid arguments
word = "hello world test"
tag = "NOUN"

ARGS = {
    "word": word,
    "tag": tag
}
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 2, 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
read_data Ran
ran on a synthesized input
CAMeL-Lab/arabic-gec/gec/utils/chatgpt_clean.py
code served (permissive licence) · get_code("23b93b84aae60065")
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 list, 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 tempfile
import os

# Create a temporary file with some test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("line one\n")
temp_file.write("line two\n")
temp_file.write("line three\n")
temp_file.close()

ARGS = {
    'path': temp_file.name
}
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 list, ndim 1, dtype family float — a list 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
prompt_template_n_shot Not yet run
unverified (harvested, no recorded run)
CAMeL-Lab/arabic-gec/gec/chatgpt_gec.py
code served (permissive licence) · get_code("ad6102db588adf49")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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.

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

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

For agents

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

get_harvested_code_for_paper("2305.14734")
get_code_for_paper("2305.14734")
have("2305.14734")

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

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

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

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

Connect an agent — have() is free.