SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.23627 · 2026

Neural Grammatical Error Correction for Romanian

Mihai Dascalu, Stefan Ruseti, Teodor-Mihai Cotet

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2604.23627.json · badge: /api/ran/2604.23627.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
TeodorMihai/RoGEC canonical (classifier label)
classifier basis: census
8 ran · 4 no recorded run
FunctionStatusWhere it lives
create_initial_beam_state Ran
ran, honoured the contract we drafted
TeodorMihai/RoGEC/beam_search.py
code served (permissive licence) · get_code("07818e21c17bbcf9")
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 BeamSearchState. 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 tensorflow as tf

class BeamSearchConfig:
    """Stand-in config class for beam search."""
    def __init__(self, beam_width):
        self.beam_width = beam_width

config = BeamSearchConfig(beam_width=5)

ARGS = {
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BeamSearchState — a BeamSearchState output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BeamSearchState output the recorded ndim 2 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
gather_tree Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TeodorMihai/RoGEC/beam_search.py
code served (permissive licence) · get_code("b11ea513f1e67627")
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 EagerTensor, ndim 2, dtype family float, shape (3, 2) 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 numpy as np
import tensorflow as tf

# Create small sample data for gather_tree function
# beam_length = 3, num_beams = 2

# values: shape (beam_length, num_beams) with dtype float32
values = tf.constant([
    [1.0, 2.0],
    [3.0, 4.0],
    [5.0, 6.0]
], dtype=tf.float32)

# parents: shape (beam_length, num_beams) with indices
# Each entry is a parent beam index (0 or 1 for num_beams=2)
parents = tf.constant([
    [0, 1],
    [1, 0],
    [0, 1]
], dtype=tf.int32)

ARGS = {
    "values": values,
    "parents": parents
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (3, 2) — shape (3, 2) 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
gather_tree_py Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TeodorMihai/RoGEC/beam_search.py
code served (permissive licence) · get_code("978d1fd856eed942")
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 ndarray, ndim 2, dtype family float, shape (4, 3) 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 numpy as np

# Create small example data for gather_tree_py
# The function expects:
# - values: 2D array of shape (beam_length, num_beams)
# - parents: list/array of shape (beam_length, num_beams) with parent indices

beam_length = 4
num_beams = 3

# Create values array with distinct values for traceability
values = np.arange(beam_length * num_beams, dtype=np.float32).reshape(beam_length, num_beams)

# Create parents array - each entry points to a parent beam index (0 to num_beams-1)
# This needs to be indexable as parents[level][beam_id]
parents = np.array([
    [0, 1, 2],  # level 3: parents for each beam
    [0, 1, 0],  # level 2
    [1, 2, 1],  # level 1
    [0, 1, 2],  # level 0 (usually not used but included)
], dtype=np.int32)

ARGS = {
    "values": values,
    "parents": parents,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 3) — shape (4, 3) 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
point_repl Ran
ran; our contract draft was wrong, not the code
TeodorMihai/RoGEC/synthetic_generate/generate.py
code served (permissive licence) · get_code("34b9e8ee7abc4211")
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 re

def point_repl(matchobj) -> str:
    return matchobj.group(1) + '. '

# The function takes a match object from a regex search
# It calls matchobj.group(1) to get the first captured group
# and concatenates it with '. '

# Create a valid match object by performing a regex search
pattern = r'([a-z]+)'
text = 'hello world'
matchobj = re.search(pattern, text)

ARGS = {
    'matchobj': matchobj
}
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 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
prepare_datasets Ran
ran; our contract draft was wrong, not the code
TeodorMihai/RoGEC/transformer/dataset.py
code served (permissive licence) · get_code("695abdff0f8b6e82")
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 tensorflow as tf

class Args:
    def __init__(self):
        self.buffer_size = 10
        self.batch_size = 2

def create_dummy_dataset(num_samples=4):
    """Create a small dummy tf.data.Dataset"""
    data = tf.data.Dataset.from_tensor_slices(
        (tf.random.normal((num_samples, 3)), 
         tf.random.normal((num_samples, 2)))
    )
    return data

train_dataset = create_dummy_dataset(num_samples=4)
dev_dataset = create_dummy_dataset(num_samples=4)
args = Args()

ARGS = {
    "train_dataset": train_dataset,
    "dev_dataset": dev_dataset,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
quote_repl Ran
ran; our contract draft was wrong, not the code
TeodorMihai/RoGEC/synthetic_generate/generate.py
code served (permissive licence) · get_code("10dfb6e4a44696c7")
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 re

# Analyze the function: quote_repl takes a matchobj (re.Match object)
# It accesses matchobj.group(1), matchobj.group(2), matchobj.group(3)
# Each group is stripped and indexed [0] to get first character
# Returns a string concatenation

# Create a mock match object that has the required groups
class MockMatchObject:
    def __init__(self):
        self._groups = {
            1: "  '  ",      # group(1): whitespace + quote char + whitespace
            2: "hello",      # group(2): middle content
            3: "  '  "       # group(3): whitespace + quote char + whitespace
        }
    
    def group(self, n):
        return self._groups[n]

matchobj = MockMatchObject()

ARGS = {
    "matchobj": matchobj
}
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 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
scale_funct Ran
ran; our contract draft was wrong, not the code
TeodorMihai/RoGEC/testing.py
code served (permissive licence) · get_code("2ba242072107a295")
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.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - d1 and d2 are divided by 2.0 (numeric operation), so they should be numeric arrays/tensors
# - d1 and d2 are indexed with [1:] (slicing operation), so they should be sequences
# - label is returned as-is
# - The function returns a tuple of ((d1, d2), label)

# Create small tensors for d1 and d2
d1 = torch.tensor([1.0, 2.0, 3.0, 4.0])  # shape (4,)
d2 = torch.tensor([5.0, 6.0, 7.0, 8.0])  # shape (4,)

# Create a label
label = "test_label"

ARGS = {
    "d1": d1,
    "d2": d2,
    "label": label,
}
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 — 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
split_file Ran
ran; our contract draft was wrong, not the code
TeodorMihai/RoGEC/processings_cna.py
code served (permissive licence) · get_code("1d91ccdabdeaa79f")
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.

import csv
import os
import tempfile
from sklearn.model_selection import train_test_split

# Create a temporary CSV file with sample data
with tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False, newline='') as f:
    temp_file = f.name
    writer = csv.writer(f)
    # Write sample rows with two columns each
    writer.writerow(['label1', 'text1'])
    writer.writerow(['label2', 'text2'])
    writer.writerow(['label3', 'text3'])
    writer.writerow(['label4', 'text4'])
    writer.writerow(['label5', 'text5'])
    writer.writerow(['label6', 'text6'])
    writer.writerow(['label7', 'text7'])
    writer.writerow(['label8', 'text8'])
    writer.writerow(['label9', 'text9'])
    writer.writerow(['label10', 'text10'])

ARGS = {
    'in_file': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn — 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
compute_statistics_text Not yet run
unverified (harvested, no recorded run)
TeodorMihai/RoGEC/synthetic_generate/filter_sent.py
code served (permissive licence) · get_code("fdcdc4c403d93558")
How it ran

no invocation recorded.

get_custom_dataset Not yet run
unverified (harvested, no recorded run)
TeodorMihai/RoGEC/testing.py
code served (permissive licence) · get_code("4fef2402b9146813")
How it ran

no invocation recorded.

ratio_diacritics Not yet run
unverified (harvested, no recorded run)
TeodorMihai/RoGEC/synthetic_generate/filter_sent.py
code served (permissive licence) · get_code("07ae0b8e3e8381cf")
How it ran

no invocation recorded.

ratio_normal_characters Not yet run
unverified (harvested, no recorded run)
TeodorMihai/RoGEC/synthetic_generate/filter_sent.py
code served (permissive licence) · get_code("cbc0f330dd0881fa")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 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 12 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-23.

Repositories linked to this paper

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

Abstract

Resources for Grammatical Error Correction (GEC) in non-English languages are scarce, while available spellcheckers in these languages are mostly limited to simple corrections and rules. In this paper we introduce a first GEC corpus for Romanian consisting of 10k pairs of sentences. In addition, the German version of ERRANT (ERRor ANnotation Toolkit) scorer was adapted for Romanian to analyze this corpus and extract edits needed for evaluation. Multiple neural models were experimented, together with pretraining strategies, which proved effective for GEC in low-resource settings. Our baseline consists of a small Transformer model trained only on the GEC dataset (F0.5 = 44.38), whereas the best performing model is produced by pretraining a larger Transformer model on artificially generated data, followed by finetuning on the actual corpus (F0.5 = 53.76). The proposed method for generating additional training examples is easily extensible and can be applied to any language, as it requires only a POS tagger.

For agents

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

get_harvested_code_for_paper("2604.23627")
get_code_for_paper("2604.23627")
have("2604.23627")

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

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

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

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

Connect an agent — have() is free.