Proofbird Grammar β€” English

gector-bert-en Β· on-device English grammar correction

A GECToR-style sequence tagger for English grammatical error correction, exported to ONNX (fp32) to run on the CPU. It is the on-device grammar model of Proofbird, a writing assistant for Windows, and it is published here so anyone can inspect what runs on their machine.

GECToR does not rewrite text. For each token it predicts one edit tag (keep, delete, replace with a word, append a word, change case, change a verb form), and the edits are applied and the sentence re-tagged up to five times. The tagger only proposes local edits; it never paraphrases.

What it corrects

Subject-verb agreement (The results shows β†’ show), tense and participle forms (have went β†’ have gone), a/an, irregular plurals, confusables (their/there/they're, its/it's, then/than), doubled words, capitalisation at the start of a sentence, and everyday-register errors in questions, imperatives and the first and second person (Does the machines work β†’ Do, Opens the window β†’ Open).

How it was trained

  • Base encoder: google-bert/bert-base-cased (Apache-2.0). A tagging head (5 000 edit labels) and an error-detection head sit on top.
  • Data: synthetic only. 3 000 000 sentences from English Wikipedia (wikimedia/wikipedia, 20231101.en) and 250 000 sentences from Tatoeba were corrupted by hand-written English error rules; about 10% stay clean, so the model learns to leave correct text alone. 150 000 additional template sentences teach patterns Wikipedia rarely contains (questions, imperatives, first and second person, group and mass nouns, irregular plurals, errors in a later clause).
  • No learner corpora and no non-commercial data of any kind. No user text was used.
  • One epoch (100 344 steps, batch 64, peak learning rate 1.5e-5) on one NVIDIA L4. Run id 2026-11-06-0801.

How it was measured

Check Result
Gold set (420 hand-written sentences: 266 with one error each, 154 correct) 258 fixed, 154 left alone, 8 missed, 0 made worse
False alarms on 4 000 everyday Tatoeba sentences (held out from training) 2 changed (0.05%)
False alarms on 2 000 Wikipedia sentences left untouched by human editors 3 changed (0.15%)
Stability: the gold re-run with one extra token in front of each sentence 8 of 206 sentences change result (the 4 capitalisation rows change by construction and are not counted)

The gold score is with the apply-side guards in gector-guards.json (below). The model was trained for precision: a missed error costs less than a wrong correction. It edits rarely, and what it leaves alone is not a judgement that the text is perfect. Word knowledge is its weakest area: a compound or mass noun it has not seen (dog food, consumer market) can draw a wrong number change, which the guards hold back where the shape is known.

Files

File What it is
model.onnx The tagger (fp32, opset 17). Inputs input_ids, attention_mask; outputs logits_labels [1, T, 5000] and logits_d [1, T, 2].
config.json The edit-label vocabulary (id2label).
vocab.txt, tokenizer.json, tokenizer_config.json The base encoder's WordPiece tokenizer.
gector-meta.json Export facts: encoder, tokenizer family, decoding defaults, run id.
gector-guards.json Apply-side guards: rules that hold back an edit the model gets wrong in a known way (for example a number change on a noun right after a numeral). Part of the measured result.
language-rules.json Language facts the runtime needs (sentence-final punctuation handling).
verb-form-vocab.txt The English verb-form table for the $TRANSFORM_VERB_* tags.

Proofbird runs the model with ONNX Runtime and its own C# tokenizer and decoder; the files are standard, so any GECToR-style decoder can use them.

Licence and attribution

The model weights and the files in this repository are released under the Apache License 2.0.

The training data carries its own terms. Wikipedia text is Β© Wikipedia contributors, CC BY-SA 4.0. Tatoeba sentences are from tatoeba.org, CC BY 2.0 FR. The base encoder is google-bert/bert-base-cased, Apache-2.0. The tagging scheme and verb-form-vocab.txt come from the GECToR project (Omelianchuk et al., 2020, GECToR – Grammatical Error Correction: Tag, Not Rewrite), Apache-2.0.

Contact

Published by Patrick Andrew Hartnett as personal work. Questions and reports: open a discussion on this repository.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for proofbird/gector-bert-en

Quantized
(6)
this model

Dataset used to train proofbird/gector-bert-en