---
title: "Arabic grammar and spelling correction with an LLM | BroadRouter"
description: "Correct Arabic spelling and grammar with an LLM API: a minimal-edit prompt, a guard against rewrites, word-level edits by error class and M2-style scoring."
url: https://broadrouter.com/blog/arabic-grammar-spelling-correction-llm/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Arabic grammar and spelling correction with an LLM: a how-to

By the BroadNet Inference team · 8 min read · Published 2026-11-15 · Updated 2026-11-16

Ask the model for the corrected text only, with the fewest possible edits and no rephrasing. Then diff the reply against the input in code: reject replies that changed too much, and label each word-level edit as hamza, taa marbuta, alef maqsura, merge, split or other. Score a hand-corrected sample on edits, with precision, recall and F0.5.

## Key takeaways

-   On the QALB-2014 test set, GPT-4 with five examples scored 65.49 F1 against 67.70 for a fine-tuned AraT5v2 (Kwon et al., ArabicNLP 2023). Prompted LLMs are usable, not automatically better.
-   Hamzated alifs and alef maqsura/ya confusion are the most common Arabic spelling errors, according to the QALB shared-task organisers.
-   Correction is scored on edits, not on whole sentences. Extract word-level edits from the reply, compare them with gold edits and report F0.5, which weights precision twice as much as recall.
-   Never normalise text before correcting it. Normalisation maps أ إ آ to ا and ة to ه on purpose, which erases exactly the errors you want to fix.
-   Guard against rewrites in code: if the reply is less than 80% similar to the input at the character level, keep the original and log the reply.

**On this page**

1.  How good are LLMs at Arabic grammar correction?
2.  Why not just normalise the text?
3.  What should the prompt say?
4.  How do you check the model’s reply?
5.  Which error classes should you track?
6.  How do you score a corrector?
7.  What about Tibyan and synthetic data?
8.  Which BroadNet model should you use?
9.  Where BroadNet Inference fits

Arabic proofreading looks like a one-line prompt: “correct this text”. In practice the model also rephrases, adds diacritics, swaps a dialect word for a formal one and explains its changes, and you can’t tell which edits were needed. This post builds a corrector on an OpenAI-compatible LLM that makes the fewest edits, checks the reply in code, labels each edit by error type and scores the whole thing the way the research benchmarks do.

## How good are LLMs at Arabic grammar correction?

The standard benchmarks are the QALB shared tasks. QALB-2014 used Modern Standard Arabic comments from Al Jazeera’s website: over one million words of training text with about 306,000 corrections, and test sets of about 50,000 words. QALB-2015 added a second track of essays by learners of Arabic as a foreign language (L2). Both scored systems on edits with the M2 scorer. The best scores, F1 (higher is better):

| Test set | Best system F1 | Text |
| --- | --- | --- |
| QALB-2014 test | 67.91 | Native speakers’ news comments |
| QALB-2015 native test | 72.87 | Native speakers’ news comments |
| QALB-2015 L2 test | 41.20 | Learners’ essays |

The L2 row is the useful warning. Learner text has more lexical choice errors and missing words, and the best system scored far lower. If your users are learners, expect your numbers to look more like that row.

Kwon, Bhatia, Nagoudi and Abdul-Mageed (ArabicNLP 2023) then ran ChatGPT and GPT-4 on the QALB-2014 test set. On the same scorer:

| System | F1 |
| --- | --- |
| ChatGPT, 1 example | 53.59 |
| ChatGPT, 5 examples | 63.98 |
| GPT-4, 5 examples | 65.49 |
| AraT5v2, fine-tuned | 67.70 |

Two details matter for your prompt. More examples helped a lot. And zero-shot prompts and Arabic-language prompts gave replies full of explanations that the authors could not score automatically. A corrector needs output a program can diff.

## Why not just normalise the text?

The [Arabic text normalizer](https://broadrouter.com/tools/arabic-text-normalizer/) on this site removes tashkeel and tatweel, maps أ إ آ to ا and, optionally, ى to ي and ة to ه. That is the right step for search, because a user who types احمد should find أحمد. It is the wrong step before correction, because it erases the distinction the corrector has to restore. After normalisation, انا and أنا are the same string, so the hamza error disappears and so does the fix.

Keep three copies when you need both: the original text, the corrected text you show users, and a normalised copy of the corrected text for your search index. [Arabic text normalization for search](https://broadrouter.com/blog/arabic-text-normalization-search/) covers the indexing side. One normalisation step does belong before correction: Unicode NFC, which joins a decomposed alif plus combining hamza into one character, so the diff doesn’t report a change that isn’t there.

## What should the prompt say?

Ask for minimal edits, name the error types you care about, forbid the changes you don’t want and ask for the corrected text alone. Writing the instructions in English or Arabic is your choice; [Arabic prompt engineering](https://broadrouter.com/blog/arabic-prompt-engineering/) covers the trade-off. Kwon et al. got usable output from English instructions with examples. Adding three to five corrected sentence pairs from your own data (few-shot) is the cheapest improvement to try first.

Set temperature to 0. You want the same correction every time. If the text is a dialect such as Egyptian or Gulf Arabic, say whether to keep the dialect. The prompt below assumes Modern Standard Arabic ([MSA](https://broadrouter.com/glossary/msa/)) and tells the model not to change style, which also covers dialect.

## How do you check the model’s reply?

The code makes one request, measures how much the reply differs from the input, extracts word-level edits and labels each one.

```python
import difflib, os, re, unicodedata
from openai import OpenAI

client = OpenAI(base_url="https://inference.broadnet.ai/v1", api_key=os.environ["BROADNET_API_KEY"])

SYSTEM = """You are an Arabic proofreader. Correct spelling, grammar and punctuation
errors in the user's Modern Standard Arabic text with the fewest possible edits.
Rules:
- Fix hamza, taa marbuta (ة/ه), alef maqsura (ى/ي), agreement, missing or extra
  letters, wrongly split or merged words, and punctuation.
- Do not rephrase, reorder, shorten, translate or change the style or dialect.
- Do not add or remove diacritics (tashkeel).
- If the text is already correct, return it unchanged.
Reply with the corrected text only: no explanation, no quotes, no list of changes."""

def tokens(s: str) -> list[str]:
    s = unicodedata.normalize("NFC", s)        # composed hamza forms, so أ is one character
    return re.findall(r"\w+|[^\w\s]", s)       # Arabic letters are \w; ، ؟ ؛ become tokens

def edits(src: str, hyp: str) -> list[tuple]:
    """Word-level edits (start, end, replacement, original): the idea behind an M2 file's A lines."""
    a, b = tokens(src), tokens(hyp)
    out = []
    for op, i1, i2, j1, j2 in difflib.SequenceMatcher(None, a, b, autojunk=False).get_opcodes():
        i, j = i1, j1
        while op != "equal" and (i < i2 or j < j2):     # split the block into one-word edits
            if i + 1 < i2 and j < j2 and a[i] + a[i + 1] == b[j]:      # و قابلت -> وقابلت
                out.append((i, i + 2, b[j], f"{a[i]} {a[i + 1]}")); i += 2; j += 1
            elif i < i2 and j + 1 < j2 and a[i] == b[j] + b[j + 1]:    # عبدالله -> عبد الله
                out.append((i, i + 1, f"{b[j]} {b[j + 1]}", a[i])); i += 1; j += 2
            elif i < i2 and j < j2:
                out.append((i, i + 1, b[j], a[i])); i += 1; j += 1
            elif i < i2:                                                # deleted word
                out.append((i, i + 1, "", a[i])); i += 1
            else:                                                       # inserted word
                out.append((i, i, b[j], "")); j += 1
    return out

HAMZA = str.maketrans("أإآٱؤئ", "ااااوي")
RULES = [("hamza", lambda w: w.translate(HAMZA).replace("ء", "")),
         ("taa marbuta", lambda w: w.replace("ة", "ه")),
         ("alef maqsura", lambda w: w.replace("ى", "ي"))]

def error_class(orig: str, corr: str) -> str:
    if all(not c.isalnum() for c in (orig + corr).replace(" ", "")):
        return "punctuation"
    if orig != corr and orig.replace(" ", "") == corr.replace(" ", ""):
        return "merge" if " " in orig else "split"
    for name, f in RULES:
        if orig != corr and f(orig) == f(corr):
            return name
    both = lambda w: RULES[2][1](RULES[1][1](RULES[0][1](w)))
    if both(orig) == both(corr):
        return "mixed orthography"
    return "other"

def correct(text: str, model="broadnet/qwen3.8-27b", min_similarity=0.8) -> dict:
    r = client.chat.completions.create(
        model=model, temperature=0, max_tokens=2000,
        messages=[{"role": "system", "content": SYSTEM}, {"role": "user", "content": text}])
    out = r.choices[0].message.content.strip()
    sim = difflib.SequenceMatcher(None, text, out, autojunk=False).ratio()
    if sim < min_similarity:             # a rewrite, not a correction: keep the original
        return {"text": text, "edits": [], "rejected": out, "similarity": round(sim, 2)}
    return {"text": out, "similarity": round(sim, 2),
            "edits": [{"from": o, "to": c, "class": error_class(o, c)} for _, _, c, o in edits(text, out)]}
```

We ran it against a local mock server with canned replies (no live API call, since the mock returns whatever we wrote). For ذهبت الى المدرسه و قابلت المعلمه في الصباح, a reply of ذهبت إلى المدرسة وقابلت المعلمة في الصباح gave four edits: الى to إلى (hamza), المدرسه to المدرسة (taa marbuta), و قابلت to وقابلت (merge) and المعلمه to المعلمة (taa marbuta). For مشي الي it listed مشي to مشى (alef maqsura) and الي to إلى (mixed orthography, since it fixes hamza and alef maqsura at once). A canned reply that turned الطقس جميل اليوم into a sentence twice as long scored 0.52 similarity, so the code kept the original and logged the reply.

Notes on the code:

-   **The similarity guard is a blunt tool.** A heavily misspelled sentence can legitimately fall near 0.8. Tune the threshold on your own data, and send rejected replies to a person, not to the bin.
-   **`max_tokens=2000`** leaves room for reasoning. BroadNet’s docs say DeepSeek V4.1 Flash, GLM 5.3 and Qwen3.8 27B reason before answering and that reasoning counts toward `max_tokens`; you can also set `reasoning_effort` to low. See [empty responses from reasoning models](https://broadrouter.com/guides/reasoning-tokens-empty-response/).
-   **The class labels are rules, not a parser.** “Other” includes missing letters (مسؤل to مسؤول), agreement and word choice. For a full taxonomy, run ARETA (below) on the same pairs.

## Which error classes should you track?

The QALB organisers name hamzated alifs and alef maqsura/ya confusion as the most common Arabic spelling errors. ARETA, CAMeL Lab’s error-type annotator (Belkebir and Habash, CoNLL 2021), uses a tagset based on the Arabic Learner Corpus. Its orthographic tags include OH (hamza), OT (ha and taa marbuta) and OA (alif and ya), next to morphological, syntactic, semantic, punctuation, merge (MG) and split (SP) tags. Its paper reports 85.8% micro-average F1 against hand-labelled learner text.

| Class | Wrong | Right | What goes wrong |
| --- | --- | --- | --- |
| Hamza | انا، الى، مسأله | أنا، إلى، مسألة | Hamza missing, on the wrong seat or on the wrong side of alif |
| Taa marbuta | المدرسه | المدرسة | Final ة written as ه, or the reverse |
| Alef maqsura | مشي، علي (preposition) | مشى، على | Final ى written as ي; علي is also a name, so context decides |
| Merge or split | و قابلت، عبدالله | وقابلت، عبد الله | Spaces around و and ال, compound names |
| Punctuation | missing ، or ؟ | added | QALB annotators agreed least on punctuation |

Track recall per class. A model that fixes taa marbuta but misses hamza after a preposition needs examples of that pattern, not a different model.

## How do you score a corrector?

Grammatical error correction is scored on edits. Compare the edits that turn the source into a hand-corrected gold sentence with the edits that turn it into the model’s output. Precision is the share of model edits that match gold. Recall is the share of gold edits the model made. QALB reported F1; later work, including Kwon et al., also reports F0.5, which weights precision twice as much as recall, because a wrong “correction” annoys users more than a missed one.

```python
from collections import Counter

def score(sources, golds, hyps, beta=0.5):
    """Exact-match edit scoring: an edit counts only if span and replacement both match gold."""
    tp = fp = fn = 0
    by_class = Counter()
    for s, g, h in zip(sources, golds, hyps):
        G = {e[:3] for e in edits(s, g)}
        H = {e[:3] for e in edits(s, h)}
        tp += len(G & H); fp += len(H - G); fn += len(G - H)
        for e in edits(s, g):
            by_class[(error_class(e[3], e[2]), e[:3] in H)] += 1
    p = tp / (tp + fp) if tp + fp else 1.0
    r = tp / (tp + fn) if tp + fn else 1.0
    f = (1 + beta**2) * p * r / (beta**2 * p + r) if p + r else 0.0
    recall = {c: f"{by_class[(c, True)]}/{by_class[(c, True)] + by_class[(c, False)]}"
              for c in sorted({c for c, _ in by_class})}
    return {"P": round(p, 3), "R": round(r, 3), f"F{beta}": round(f, 3), "recall by class": recall}
```

On a two-sentence toy set with seven gold edits, where the output missed the merge and one taa marbuta and added a full stop, it printed P 0.833, R 0.714 and F0.5 0.806, with recall per class: hamza 2/2, taa marbuta 2/3, merge 0/1.

This is the M2 idea, simplified. The official M2 scorer searches for the alignment of system edits that best matches gold, so a correct fix split into edits differently from gold isn’t penalised. Our exact match is stricter. Use the official scorer when you compare with published numbers (its developer version still needs Python 2). ERRANT does the same edit extraction for English only.

Build the gold set from real user text, 100 to 200 sentences, corrected by one careful annotator with the same minimal-edit rules you gave the model. Run each candidate model and prompt over it, and compare F0.5 and per-class recall. [How to evaluate an LLM before switching](https://broadrouter.com/blog/evaluate-llm-before-switching/) covers running that comparison fairly.

## What about Tibyan and synthetic data?

Labelled Arabic correction data is scarce. Alrehili and Alhothali point out that QALB-14 and QALB-15 together hold about 20,500 parallel examples. Their Tibyan corpus (arXiv 2024, later in PeerJ Computer Science) used ChatGPT to generate error and correct sentence pairs from books on common Arabic errors, reviewed by linguists. It holds about 600,000 tokens, with seven error types: orthography, morphology, syntax, semantics, punctuation, merge and split. The authors say the corpus is public; we did not find a download link to check its licence. It is useful for few-shot examples and stress tests, but it is synthetic, so don’t use it as your acceptance test.

If you need a non-LLM baseline, CAMeL Lab’s arabic-gec repository publishes the code and models from Alhafni et al. (EMNLP 2023). For spelling only, the ar-corrector package suggests dictionary words within one or two edits; it doesn’t handle grammar, and its last release was in 2021.

## Which BroadNet model should you use?

Prices are per 1M tokens from BroadNet’s pricing page. Correction output is about as long as the input, so the output price matters.

| Model | Why | Input / output |
| --- | --- | --- |
| [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/) | Reasoning documented; BroadNet reports Arabic testing including Gulf and Egyptian dialect understanding | $0.175 / $2.17 |
| [GLM 5.3](https://broadrouter.com/models/glm-5.3/) | Reasoning documented; long context for whole documents | $0.78 / $3.46 |
| [DeepSeek V4.1 Flash](https://broadrouter.com/models/deepseek-v4.1-flash/) | Lowest output price of the reasoning models here; also on flat session plans | $0.175 / $0.52 |
| [Gemma 4 VL 26B](https://broadrouter.com/models/gemma-4-vl-26b/) | Runs on the $5 starting credit, so you can build the pipeline before topping up | $0.10 / $0.22 |

Run the scorer with each model on your gold set and choose on F0.5 and price. Arabic usually takes more tokens per word than English; paste a sample into the [Arabic token counter](https://broadrouter.com/tools/arabic-token-counter/) and estimate the bill with the [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/). To proofread a large archive, BroadNet has no Batch API; [batch processing without a Batch API](https://broadrouter.com/blog/llm-batch-processing-without-batch-api/) shows how to run it with bounded concurrency, or on a DeepSeek session for $15 a week (one request at a time per session).

## Where BroadNet Inference fits

BroadRouter is BroadNet’s own site. [BroadNet Inference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabic-grammar-spelling-correction-llm&utm_content=body) gives OpenAI-compatible access to the models above, so the code runs with the [OpenAI Python SDK](https://broadrouter.com/guides/openai-python-sdk/) after changing the base URL. It has no proofreading endpoint and publishes no Arabic correction benchmark of its own, so measure on your text. Its privacy statement says inference content is not retained, which matters when you proofread customer messages. If you need a self-hosted corrector for very high volume, a fine-tuned model such as those from CAMeL Lab may be cheaper and more consistent; the published scores above are the reason to test both.

Free tools for this

-   [Arabic token counter](https://broadrouter.com/tools/arabic-token-counter/) Arabic vs English token counts per tokenizer: the "Arabic tax" in tokens and money.
-   [Arabic text normalizer](https://broadrouter.com/tools/arabic-text-normalizer/) Tashkeel, tatweel, alef, ya, ta marbuta, digits and invisible characters, with a matching Python function.
-   [Speech-to-text cost calculator](https://broadrouter.com/tools/speech-to-text-cost-calculator/) Hours, calls or voice notes to a monthly transcription bill, against your current provider.

[All free tools](https://broadrouter.com/tools/)

## Terms in this article

[Hamza](https://broadrouter.com/glossary/hamza/)

Hamza (ء) is the Arabic letter for the glottal stop. It is written on its own or on a seat: alef (أ إ), waw (ؤ) or yeh (ئ), and آ combines alef with madda. Because typed text is inconsistent about it, search engines and speech scoring often fold the alef forms into ا.

[Taa marbuta](https://broadrouter.com/glossary/taa-marbuta/)

Taa marbuta (ة, U+0629) is an Arabic letter that appears only at the end of a word, often marking feminine nouns and adjectives. It looks like heh (ه, U+0647) with two dots, so typed text mixes the two, and many search normalizers map ة to ه.

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[Modern Standard Arabic (MSA)](https://broadrouter.com/glossary/msa/)

Modern Standard Arabic (MSA) is the standardized form of Arabic used in writing, news, education and formal speech across the Arab world. It is nobody's native everyday language: people speak regional dialects such as Egyptian or Gulf Arabic and switch to MSA in formal settings.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[Arabic diacritics (tashkeel)](https://broadrouter.com/glossary/arabic-diacritics/)

Arabic diacritics, or tashkeel, are small marks written above or below letters to show short vowels, doubled consonants and the absence of a vowel. They are optional: most Arabic text, including news, omits them, so readers and software infer the vowels from context.

[Arabic text normalization](https://broadrouter.com/glossary/arabic-text-normalization/)

Arabic text normalization is the step that maps spelling variants of the same word to one form before matching: removing diacritics and tatweel, unifying alef forms, and often mapping ى to ي and ة to ه. It is applied to search keys and evaluation, not to text you display.

[Batch API](https://broadrouter.com/glossary/batch-api/)

A batch API is an asynchronous LLM endpoint that accepts many requests at once, usually as a file, processes them within a set window instead of immediately, and returns the results together. Providers such as OpenAI and Anthropic price batch requests at a discount to their standard APIs.

## Questions

### Can ChatGPT or another LLM correct Arabic grammar?

Yes, with limits. In a published test on the QALB-2014 benchmark, GPT-4 with five examples reached 65.49 F1, close to but below a fine-tuned AraT5v2 at 67.70. Use a minimal-edit prompt, check the reply in code and measure on a sample of your own text.

### What are the most common Arabic spelling mistakes?

Hamza on alif (انا for أنا, الى for إلى), alef maqsura written as ya (مشي for مشى), taa marbuta written as ha (المدرسه for المدرسة), and words wrongly split or joined, such as و قابلت for وقابلت. The QALB organisers name hamzated alifs and alef maqsura/ya confusion as the most common.

### Is Arabic text normalization the same as spelling correction?

No. Normalization deliberately merges spelling variants, such as أ and ا, so search and matching ignore them. Correction decides which variant is right in context. Run correction on the original text, and normalise only the copy you index for search.

### How do I evaluate an Arabic grammar corrector?

Hand-correct 100 to 200 real sentences with minimal edits. Extract word-level edits from source to gold and from source to model output, then count matching edits for precision, recall and F0.5. The M2 scorer used by QALB does this with a smarter edit alignment.

### Is there an Arabic grammar checker library for Python?

For spelling only, ar-corrector suggests dictionary words within one or two edits. For grammar, CAMeL Lab publishes research GEC models and code (arabic-gec). An LLM API is the quickest way to start; a fine-tuned model may be more consistent at high volume.

## Keep reading

-   [Arabic text normalization for search and RAG: what to change, what not](https://broadrouter.com/blog/arabic-text-normalization-search/)
-   [Add diacritics to Arabic text with an LLM: prompt, checks, DER](https://broadrouter.com/blog/arabic-diacritization-llm/)
-   [Arabic prompt engineering: register, RTL, numerals and mixed text](https://broadrouter.com/blog/arabic-prompt-engineering/)
-   [Arabic named entity extraction with an LLM: JSON, dates and checks](https://broadrouter.com/blog/arabic-named-entity-extraction-llm/)
-   [Choosing an LLM API for Arabic: what to test](https://broadrouter.com/blog/choosing-an-llm-for-arabic/)
-   [How to evaluate an LLM before switching providers](https://broadrouter.com/blog/evaluate-llm-before-switching/)
-   [LLM batch processing without a Batch API: a resumable runner](https://broadrouter.com/blog/llm-batch-processing-without-batch-api/)
-   [Arabic meeting minutes from recordings: an API pipeline](https://broadrouter.com/blog/arabic-meeting-minutes-from-recordings/)
-   [Arabic OCR API comparison: Google, Azure, Textract, Mistral, LLMs](https://broadrouter.com/blog/arabic-ocr-api-comparison/)
-   [Guide: Use the OpenAI Python SDK with BroadNet Inference](https://broadrouter.com/guides/openai-python-sdk/)
-   [Guide: Why a reasoning model returns an empty answer](https://broadrouter.com/guides/reasoning-tokens-empty-response/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabic-grammar-spelling-correction-llm&utm_content=page-cta) ·

**Sources**

-   [Mohit et al., The First QALB Shared Task on Automatic Text Correction for Arabic, ANLP workshop at EMNLP 2014: data, M2 scorer, Table 3 and Table 7 (checked 2026-11-15)](https://aclanthology.org/W14-3605/)
-   [Rozovskaya et al., The Second QALB Shared Task on Automatic Text Correction for Arabic, WANLP 2015: native and L2 tracks, Tables 4, 8 and 9 (checked 2026-11-15)](https://aclanthology.org/W15-3204/)
-   [Kwon, Bhatia, Nagoudi and Abdul-Mageed, Beyond English: Evaluating LLMs for Arabic Grammatical Error Correction, ArabicNLP 2023, Table 2 (checked 2026-11-15)](https://aclanthology.org/2023.arabicnlp-1.9/)
-   [Alrehili and Alhothali, Tibyan Corpus: Balanced and Comprehensive Error Coverage Corpus Using ChatGPT for Arabic GEC, arXiv 2411.04588 (checked 2026-11-15)](https://arxiv.org/abs/2411.04588)
-   [Belkebir and Habash, Automatic Error Type Annotation for Arabic (ARETA), CoNLL 2021 (checked 2026-11-15)](https://aclanthology.org/2021.conll-1.47/)
-   [CAMeL Lab, ARETA on GitHub (MIT): ALC-based error tags such as OH hamza, OT ha/ta marbuta, OA alif/ya, MG merge, SP split (checked 2026-11-15)](https://github.com/CAMeL-Lab/arabic_error_type_annotation)
-   [Alhafni, Inoue, Khairallah and Habash, Advancements in Arabic Grammatical Error Detection and Correction, EMNLP 2023; code and models at CAMeL-Lab/arabic-gec (checked 2026-11-15)](https://aclanthology.org/2023.emnlp-main.396/)
-   [NUS M2Scorer on GitHub: edit-level precision, recall and F-beta for GEC; developer version needs Python 2 (checked 2026-11-15)](https://github.com/nusnlp/m2scorer)
-   [ERRANT on GitHub: extracts and classifies edits into M2 format; English only (checked 2026-11-15)](https://github.com/chrisjbryant/errant)
-   [ar-corrector on PyPI: dictionary spell-checker, 500,000+ words, 1-2 edit candidates, version 1.1.6 from April 2021 (checked 2026-11-15)](https://pypi.org/project/ar-corrector/)
-   [BroadNet Inference API reference: model IDs, reasoning counts toward max\_tokens, reasoning\_effort (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabic-grammar-spelling-correction-llm&utm_content=sources)
