---
title: "LLM से अरबी व्याकरण और वर्तनी की ग़लतियाँ सुधारें | BroadRouter"
description: "LLM API से अरबी वर्तनी और व्याकरण सुधारें: कम से कम बदलाव वाला प्रॉम्प्ट, दोबारा लिखने से बचाव, ग़लती की क़िस्म के हिसाब से edits और M2 जैसी स्कोरिंग।"
url: https://broadrouter.com/hi/blog/arabic-grammar-spelling-correction-llm/
lang: hi
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

यह पेज अंग्रेज़ी से AI की मदद से अनुवाद किया गया है। [अंग्रेज़ी मूल पढ़ें](https://broadrouter.com/blog/arabic-grammar-spelling-correction-llm/) (2026-11-16 को अपडेट किया गया).

# LLM से अरबी व्याकरण और वर्तनी सुधार: एक how-to

BroadNet Inference टीम · 8 मिनट में पढ़ें · प्रकाशित 2026-11-15 · अपडेट किया गया 2026-11-16

मॉडल से सिर्फ़ सुधरा हुआ टेक्स्ट माँगें, कम से कम बदलाव के साथ और बिना वाक्य बदले। फिर कोड में जवाब का इनपुट से diff निकालें: बहुत ज़्यादा बदले जवाब रद्द करें, और हर शब्द-स्तर के edit को hamza, taa marbuta, alef maqsura, merge, split या other का लेबल दें। हाथ से सुधारे सैंपल पर edits के आधार पर precision, recall और F0.5 निकालें।

## मुख्य बातें

-   QALB-2014 test set पर पाँच उदाहरणों वाले GPT-4 ने 65.49 F1 पाया, जबकि fine-tuned AraT5v2 ने 67.70 (Kwon et al., ArabicNLP 2023)। प्रॉम्प्ट वाले LLM काम के हैं, अपने-आप बेहतर नहीं।
-   QALB shared task के आयोजकों के अनुसार hamza वाले alif और alef maqsura/ya की गड़बड़ी अरबी की सबसे आम वर्तनी ग़लतियाँ हैं।
-   सुधार को पूरे वाक्यों पर नहीं, edits पर स्कोर किया जाता है। जवाब से शब्द-स्तर के edits निकालें, gold edits से मिलाएँ और F0.5 बताएँ, जो precision को recall से दोगुना वज़न देता है।
-   सुधारने से पहले टेक्स्ट को कभी normalize न करें। Normalization जान-बूझकर أ إ آ को ا और ة को ه में बदलता है, जिससे ठीक वही ग़लतियाँ मिट जाती हैं जिन्हें आप सुधारना चाहते हैं।
-   कोड में दोबारा लिखने से बचाव रखें: अगर अक्षर-स्तर पर जवाब इनपुट से 80% से कम मिलता है, तो मूल टेक्स्ट रखें और जवाब log करें।

**इस पेज पर**

1.  LLM अरबी व्याकरण सुधारने में कितने अच्छे हैं?
2.  सीधे टेक्स्ट normalize क्यों न करें?
3.  प्रॉम्प्ट में क्या लिखें?
4.  मॉडल का जवाब कैसे जाँचें?
5.  किन error classes पर नज़र रखें?
6.  सुधारक को कैसे स्कोर करें?
7.  Tibyan और synthetic डेटा का क्या?
8.  कौन-सा BroadNet मॉडल इस्तेमाल करें?
9.  BroadNet Inference कहाँ फ़िट होता है

अरबी प्रूफ़रीडिंग एक लाइन के प्रॉम्प्ट जैसी लगती है: “इस टेक्स्ट को सुधारो”। असल में मॉडल वाक्य भी बदल देता है, हरकतें जोड़ देता है, बोली के शब्द की जगह औपचारिक शब्द रख देता है और अपने बदलाव समझाने लगता है, और आप नहीं बता सकते कि कौन-से edits ज़रूरी थे। यह पोस्ट OpenAI-compatible LLM पर एक ऐसा सुधारक बनाती है जो कम से कम edits करता है, जवाब को कोड में जाँचता है, हर edit को ग़लती की क़िस्म का लेबल देता है और पूरे काम को वैसे स्कोर करता है जैसे रिसर्च benchmarks करते हैं।

## LLM अरबी व्याकरण सुधारने में कितने अच्छे हैं?

मानक benchmarks QALB shared tasks हैं। QALB-2014 ने Al Jazeera की वेबसाइट पर आई आधुनिक मानक अरबी की टिप्पणियाँ इस्तेमाल कीं: दस लाख से ज़्यादा शब्दों का training टेक्स्ट जिसमें लगभग 306,000 सुधार थे, और लगभग 50,000 शब्दों के test sets। QALB-2015 ने एक दूसरा track जोड़ा, जिसमें अरबी को विदेशी भाषा (L2) के रूप में सीखने वालों के निबंध थे। दोनों ने M2 scorer से सिस्टमों को edits पर स्कोर किया। सबसे अच्छे स्कोर, F1 (ज़्यादा बेहतर है):

| Test set | सबसे अच्छे सिस्टम का F1 | टेक्स्ट |
| --- | --- | --- |
| QALB-2014 test | 67.91 | मातृभाषियों की समाचार टिप्पणियाँ |
| QALB-2015 native test | 72.87 | मातृभाषियों की समाचार टिप्पणियाँ |
| QALB-2015 L2 test | 41.20 | सीखने वालों के निबंध |

L2 वाली पंक्ति काम की चेतावनी है। सीखने वालों के टेक्स्ट में शब्द चुनने की ग़लतियाँ और छूटे शब्द ज़्यादा होते हैं, और सबसे अच्छे सिस्टम ने भी काफ़ी कम स्कोर किया। अगर आपके यूज़र सीखने वाले हैं, तो अपने आँकड़े उसी पंक्ति जैसे होने की उम्मीद करें।

इसके बाद Kwon, Bhatia, Nagoudi और Abdul-Mageed (ArabicNLP 2023) ने QALB-2014 test set पर ChatGPT और GPT-4 चलाए। उसी scorer पर:

| सिस्टम | F1 |
| --- | --- |
| ChatGPT, 1 उदाहरण | 53.59 |
| ChatGPT, 5 उदाहरण | 63.98 |
| GPT-4, 5 उदाहरण | 65.49 |
| AraT5v2, fine-tuned | 67.70 |

आपके प्रॉम्प्ट के लिए दो बातें अहम हैं। ज़्यादा उदाहरणों से बहुत फ़ायदा हुआ। और zero-shot प्रॉम्प्ट और अरबी भाषा के प्रॉम्प्ट ने ऐसे जवाब दिए जो व्याख्याओं से भरे थे और जिन्हें लेखक अपने-आप स्कोर नहीं कर पाए। सुधारक को ऐसा आउटपुट चाहिए जिसका कोई प्रोग्राम diff निकाल सके।

## सीधे टेक्स्ट normalize क्यों न करें?

इस साइट का [अरबी टेक्स्ट normalizer](https://broadrouter.com/tools/arabic-text-normalizer/) tashkeel और tatweel हटाता है, أ إ آ को ا में बदलता है और, चाहें तो, ى को ي और ة को ه में। सर्च के लिए यह सही चरण है, क्योंकि जो यूज़र احمد टाइप करता है उसे أحمد मिलना चाहिए। सुधार से पहले यह ग़लत चरण है, क्योंकि यह वही फ़र्क़ मिटा देता है जिसे सुधारक को वापस लाना है। Normalization के बाद انا और أنا एक ही string हैं, इसलिए hamza की ग़लती ग़ायब हो जाती है और उसका सुधार भी।

जब दोनों चाहिए तो तीन कॉपी रखें: मूल टेक्स्ट, यूज़र को दिखाया जाने वाला सुधरा टेक्स्ट, और सर्च index के लिए सुधरे टेक्स्ट की normalize की हुई कॉपी। [सर्च के लिए अरबी टेक्स्ट normalization](https://broadrouter.com/hi/blog/arabic-text-normalization-search/) indexing वाला पहलू बताता है। एक normalization चरण सुधार से पहले ज़रूर आता है: Unicode NFC, जो टूटे हुए alif और combining hamza को एक अक्षर में जोड़ता है, ताकि diff ऐसा बदलाव न बताए जो है ही नहीं।

## प्रॉम्प्ट में क्या लिखें?

कम से कम edits माँगें, जिन ग़लतियों की परवाह है उनके नाम लिखें, अनचाहे बदलाव मना करें और सिर्फ़ सुधरा टेक्स्ट माँगें। निर्देश अंग्रेज़ी में लिखें या अरबी में, यह आपकी पसंद है; [अरबी प्रॉम्प्ट इंजीनियरिंग](https://broadrouter.com/hi/blog/arabic-prompt-engineering/) इस फ़ायदे-नुक़सान को समझाती है। Kwon et al. को उदाहरणों वाले अंग्रेज़ी निर्देशों से काम का आउटपुट मिला। अपने डेटा से सुधारे गए तीन से पाँच वाक्य-जोड़े (few-shot) जोड़ना सबसे सस्ता सुधार है, इसे पहले आज़माएँ।

Temperature 0 रखें। आपको हर बार एक ही सुधार चाहिए। अगर टेक्स्ट मिस्री या खाड़ी अरबी जैसी किसी बोली में है, तो बताएँ कि बोली रखनी है या नहीं। नीचे का प्रॉम्प्ट आधुनिक मानक अरबी ([MSA](https://broadrouter.com/hi/glossary/msa/)) मानता है और मॉडल से शैली न बदलने को कहता है, जिसमें बोली भी आ जाती है।

## मॉडल का जवाब कैसे जाँचें?

कोड एक अनुरोध भेजता है, मापता है कि जवाब इनपुट से कितना अलग है, शब्द-स्तर के edits निकालता है और हर एक को लेबल देता है।

```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)]}
```

हमने इसे पहले से तय जवाबों वाले एक लोकल mock सर्वर पर चलाया (कोई live API कॉल नहीं, क्योंकि mock वही लौटाता है जो हमने लिखा)। ذهبت الى المدرسه و قابلت المعلمه في الصباح के लिए, ذهبت إلى المدرسة وقابلت المعلمة في الصباح वाले जवाब ने चार edits दिए: الى से إلى (hamza), المدرسه से المدرسة (taa marbuta), و قابلت से وقابلت (merge) और المعلمه से المعلمة (taa marbuta)। مشي الي के लिए उसने مشي से مشى (alef maqsura) और الي से إلى (mixed orthography, क्योंकि यह hamza और alef maqsura दोनों एक साथ ठीक करता है) दिखाए। एक तय जवाब जिसने الطقس جميل اليوم को दोगुने लंबे वाक्य में बदल दिया, उसकी similarity 0.52 आई, इसलिए कोड ने मूल टेक्स्ट रखा और जवाब log किया।

कोड पर नोट्स:

-   **Similarity guard एक मोटा औज़ार है।** बहुत ग़लत वर्तनी वाला वाक्य जायज़ तौर पर 0.8 के आसपास आ सकता है। सीमा अपने डेटा पर ट्यून करें, और रद्द जवाब कूड़ेदान में नहीं, किसी इंसान को भेजें।
-   **`max_tokens=2000`** reasoning के लिए जगह छोड़ता है। BroadNet के docs कहते हैं कि DeepSeek V4.1 Flash, GLM 5.3 और Qwen3.8 27B जवाब से पहले reasoning करते हैं और reasoning `max_tokens` में गिनी जाती है; आप `reasoning_effort` को low भी कर सकते हैं। देखें [reasoning मॉडलों से ख़ाली जवाब](https://broadrouter.com/hi/guides/reasoning-tokens-empty-response/)।
-   **क़िस्म के लेबल नियम हैं, parser नहीं।** “Other” में छूटे अक्षर (مسؤل से مسؤول), agreement और शब्द चयन आते हैं। पूरी taxonomy के लिए उन्हीं जोड़ों पर ARETA (नीचे) चलाएँ।

## किन error classes पर नज़र रखें?

QALB के आयोजक hamza वाले alif और alef maqsura/ya की गड़बड़ी को अरबी की सबसे आम वर्तनी ग़लतियाँ बताते हैं। CAMeL Lab का error-type annotator ARETA (Belkebir और Habash, CoNLL 2021) Arabic Learner Corpus पर आधारित tagset इस्तेमाल करता है। उसके orthographic tags में OH (hamza), OT (ha और taa marbuta) और OA (alif और ya) हैं, साथ में morphological, syntactic, semantic, punctuation, merge (MG) और split (SP) tags। उसका पेपर हाथ से लेबल किए सीखने वालों के टेक्स्ट पर 85.8% micro-average F1 बताता है।

| क़िस्म | ग़लत | सही | क्या ग़लत होता है |
| --- | --- | --- | --- |
| Hamza | انا، الى، مسأله | أنا، إلى، مسألة | Hamza ग़ायब, ग़लत आधार पर, या alif की ग़लत तरफ़ |
| Taa marbuta | المدرسه | المدرسة | आख़िरी ة को ه लिखना, या उल्टा |
| Alef maqsura | مشي، علي (preposition) | مشى، على | आख़िरी ى को ي लिखना; علي एक नाम भी है, इसलिए संदर्भ तय करता है |
| Merge या split | و قابلت، عبدالله | وقابلت، عبد الله | و और ال के आसपास के स्पेस, संयुक्त नाम |
| विराम चिह्न | ، या ؟ ग़ायब | जोड़ा गया | QALB annotators विराम चिह्नों पर सबसे कम सहमत थे |

हर क़िस्म का recall देखें। जो मॉडल taa marbuta ठीक करता है पर preposition के बाद hamza छोड़ देता है, उसे उस पैटर्न के उदाहरण चाहिए, दूसरा मॉडल नहीं।

## सुधारक को कैसे स्कोर करें?

Grammatical error correction को edits पर स्कोर किया जाता है। Source को हाथ से सुधारे gold वाक्य में बदलने वाले edits की तुलना उन edits से करें जो उसे मॉडल के आउटपुट में बदलते हैं। Precision मॉडल के उन edits का हिस्सा है जो gold से मेल खाते हैं। Recall gold edits का वह हिस्सा है जो मॉडल ने किए। QALB ने F1 बताया; बाद के काम, Kwon et al. समेत, F0.5 भी बताते हैं, जो precision को recall से दोगुना वज़न देता है, क्योंकि ग़लत “सुधार” यूज़र को छूटे सुधार से ज़्यादा खटकता है।

```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}
```

सात gold edits वाले दो वाक्यों के नमूना set पर, जहाँ आउटपुट ने merge और एक taa marbuta छोड़ दिया और एक full stop जोड़ दिया, इसने P 0.833, R 0.714 और F0.5 0.806 छापा, और हर क़िस्म का recall: hamza 2/2, taa marbuta 2/3, merge 0/1।

यह M2 वाला विचार है, सरल किया हुआ। आधिकारिक M2 scorer सिस्टम edits का वह alignment खोजता है जो gold से सबसे अच्छा मेल खाए, ताकि gold से अलग ढंग से edits में बँटा सही सुधार दंडित न हो। हमारा exact match ज़्यादा सख़्त है। प्रकाशित आँकड़ों से तुलना करते समय आधिकारिक scorer इस्तेमाल करें (उसके developer वर्ज़न को अब भी Python 2 चाहिए)। ERRANT यही edit extraction सिर्फ़ अंग्रेज़ी के लिए करता है।

Gold set असली यूज़र टेक्स्ट से बनाएँ, 100 से 200 वाक्य, जिन्हें एक सावधान annotator ने उन्हीं कम से कम बदलाव वाले नियमों से सुधारा हो जो आपने मॉडल को दिए। हर उम्मीदवार मॉडल और प्रॉम्प्ट उस पर चलाएँ, और F0.5 और हर क़िस्म का recall मिलाएँ। [स्विच करने से पहले LLM का मूल्यांकन कैसे करें](https://broadrouter.com/hi/blog/evaluate-llm-before-switching/) बताता है कि यह तुलना निष्पक्ष ढंग से कैसे चलाएँ।

## Tibyan और synthetic डेटा का क्या?

लेबल किया हुआ अरबी सुधार डेटा कम है। Alrehili और Alhothali बताते हैं कि QALB-14 और QALB-15 मिलाकर लगभग 20,500 parallel उदाहरण रखते हैं। उनके Tibyan corpus (arXiv 2024, बाद में PeerJ Computer Science में) ने आम अरबी ग़लतियों पर लिखी किताबों से ChatGPT के ज़रिए ग़लत और सही वाक्य-जोड़े बनाए, जिनकी भाषाविदों ने समीक्षा की। इसमें लगभग 600,000 टोकन हैं, सात error types के साथ: orthography, morphology, syntax, semantics, punctuation, merge और split। लेखक कहते हैं कि corpus सार्वजनिक है; हमें उसका लाइसेंस जाँचने के लिए download लिंक नहीं मिला। यह few-shot उदाहरणों और stress tests के लिए काम का है, लेकिन यह synthetic है, इसलिए इसे अपने acceptance test के रूप में इस्तेमाल न करें।

अगर आपको बिना LLM वाला baseline चाहिए, तो CAMeL Lab की arabic-gec repository Alhafni et al. (EMNLP 2023) का कोड और मॉडल प्रकाशित करती है। सिर्फ़ वर्तनी के लिए ar-corrector पैकेज एक या दो edit के भीतर शब्दकोश के शब्द सुझाता है; यह व्याकरण नहीं संभालता, और इसकी आख़िरी release 2021 में आई थी।

## कौन-सा BroadNet मॉडल इस्तेमाल करें?

कीमतें BroadNet के pricing पेज से प्रति 1M टोकन हैं। सुधार का आउटपुट लगभग इनपुट जितना लंबा होता है, इसलिए आउटपुट की कीमत मायने रखती है।

| मॉडल | क्यों | इनपुट / आउटपुट |
| --- | --- | --- |
| [Qwen3.8 27B](https://broadrouter.com/hi/models/qwen3.8-27b/) | Reasoning documented; BroadNet अरबी टेस्टिंग बताता है, जिसमें खाड़ी और मिस्री बोली की समझ शामिल है | $0.175 / $2.17 |
| [GLM 5.3](https://broadrouter.com/hi/models/glm-5.3/) | Reasoning documented; पूरे दस्तावेज़ों के लिए लंबा कॉन्टेक्स्ट | $0.78 / $3.46 |
| [DeepSeek V4.1 Flash](https://broadrouter.com/hi/models/deepseek-v4.1-flash/) | यहाँ के reasoning मॉडलों में सबसे कम आउटपुट कीमत; फ़्लैट सेशन प्लान पर भी | $0.175 / $0.52 |
| [Gemma 4 VL 26B](https://broadrouter.com/hi/models/gemma-4-vl-26b/) | $5 के शुरुआती क्रेडिट पर चलता है, इसलिए टॉप-अप से पहले पाइपलाइन बना सकते हैं | $0.10 / $0.22 |

हर मॉडल के साथ अपने gold set पर scorer चलाएँ और F0.5 और कीमत के आधार पर चुनें। अरबी आमतौर पर अंग्रेज़ी से प्रति शब्द ज़्यादा टोकन लेती है; एक सैंपल [अरबी टोकन काउंटर](https://broadrouter.com/tools/arabic-token-counter/) में पेस्ट करें और [LLM API लागत कैलकुलेटर](https://broadrouter.com/tools/llm-api-cost-calculator/) से बिल का अनुमान लगाएँ। बड़े archive की प्रूफ़रीडिंग के लिए, BroadNet के पास Batch API नहीं है; [Batch API के बिना batch processing](https://broadrouter.com/hi/blog/llm-batch-processing-without-batch-api/) दिखाती है कि इसे सीमित concurrency के साथ कैसे चलाएँ, या $15 प्रति हफ़्ता वाले DeepSeek सेशन पर (हर सेशन में एक समय में एक अनुरोध)।

## BroadNet Inference कहाँ फ़िट होता है

BroadRouter, BroadNet की अपनी साइट है। [BroadNet Inference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=hi-blog-arabic-grammar-spelling-correction-llm&utm_content=body) ऊपर के मॉडलों तक OpenAI-compatible पहुँच देता है, इसलिए base URL बदलने के बाद कोड [OpenAI Python SDK](https://broadrouter.com/hi/guides/openai-python-sdk/) के साथ चलता है। इसके पास प्रूफ़रीडिंग endpoint नहीं है और यह अरबी सुधार का अपना कोई benchmark प्रकाशित नहीं करता, इसलिए अपने टेक्स्ट पर मापें। इसका privacy statement कहता है कि inference content retain नहीं किया जाता, जो ग्राहकों के संदेश प्रूफ़रीड करते समय मायने रखता है। अगर बहुत ज़्यादा वॉल्यूम के लिए self-hosted सुधारक चाहिए, तो CAMeL Lab जैसे fine-tuned मॉडल सस्ते और ज़्यादा एक जैसे हो सकते हैं; ऊपर के प्रकाशित स्कोर ही दोनों को टेस्ट करने की वजह हैं।

इस विषय के मुफ़्त टूल (अंग्रेज़ी में)

-   [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.

[मुफ़्त टूल (अंग्रेज़ी में)](https://broadrouter.com/tools/)

## इस लेख के शब्द

[हम्ज़ा (hamza)](https://broadrouter.com/hi/glossary/hamza/)

हम्ज़ा (ء) ग्लॉटल स्टॉप के लिए अरबी अक्षर है। यह अकेले या किसी कुर्सी पर लिखा जाता है: अलिफ़ (أ إ), वाव (ؤ) या ये (ئ), और آ अलिफ़ को मद्दा के साथ जोड़ता है। टाइप किए टेक्स्ट में यह एक-सा नहीं लिखा जाता, सो सर्च इंजन और स्पीच स्कोरिंग अक्सर अलिफ़ वाले रूपों को ا में बदल देते हैं।

[ता मरबूता (taa marbuta, ة)](https://broadrouter.com/hi/glossary/taa-marbuta/)

ता मरबूता (ة, U+0629) एक अरबी अक्षर है जो सिर्फ़ शब्द के अंत में आता है, अक्सर स्त्रीलिंग संज्ञा और विशेषण का संकेत देता है। यह दो बिंदुओं वाले हे (ه, U+0647) जैसा दिखता है, इसलिए टाइप किए टेक्स्ट में दोनों मिल जाते हैं, और कई सर्च नॉर्मलाइज़र ة को ه में बदल देते हैं।

[टोकन (token)](https://broadrouter.com/hi/glossary/token/)

टोकन टेक्स्ट की वह इकाई है जिसे लैंग्वेज मॉडल पढ़ता और लिखता है: कोई शब्द, शब्द का हिस्सा, विराम चिह्न या बाइट का क्रम, जो मॉडल का टोकनाइज़र बनाता है। LLM API इस्तेमाल को टोकन में गिनते हैं, उसी में लिमिट लगाते हैं और आम तौर पर बिल भी बनाते हैं।

[मानक आधुनिक अरबी (Modern Standard Arabic, MSA)](https://broadrouter.com/hi/glossary/msa/)

Modern Standard Arabic (MSA) अरबी का मानक रूप है, जो पूरी अरब दुनिया में लेखन, समाचार, शिक्षा और औपचारिक भाषण में इस्तेमाल होता है। यह किसी की रोज़मर्रा की मातृभाषा नहीं है: लोग मिस्री या खाड़ी अरबी जैसी क्षेत्रीय बोलियाँ बोलते हैं और औपचारिक मौक़ों पर MSA अपनाते हैं।

[टूल कॉलिंग (tool calling)](https://broadrouter.com/hi/glossary/tool-calling/)

टूल कॉलिंग, जिसे function calling भी कहते हैं, LLM API की वह सुविधा है जिसमें मॉडल डेवलपर के तय किए किसी फ़ंक्शन को चलाने का एक स्ट्रक्चर्ड अनुरोध, JSON आर्ग्युमेंट के साथ, लौटाता है। ऐप्लिकेशन फ़ंक्शन चलाकर नतीजा वापस भेजता है; मॉडल ख़ुद कभी कोड नहीं चलाता।

[कॉन्करेंसी (concurrency)](https://broadrouter.com/hi/glossary/concurrency/)

कॉन्करेंसी, किसी क्लाइंट के एक ही समय पर चल रहे (in-flight) अनुरोधों की संख्या है। LLM API अक्सर इसकी सीमा हर key या प्लान पर, प्रति मिनट अनुरोधों से अलग रखते हैं, क्योंकि हर खुला अनुरोध जवाब पूरा होने तक GPU क्षमता घेरे रहता है।

[टेम्परेचर (temperature)](https://broadrouter.com/hi/glossary/temperature/)

टेम्परेचर एक सैंपलिंग पैरामीटर है जो तय करता है कि लैंग्वेज मॉडल का आउटपुट कितना रैंडम होगा। मॉडल अपने टोकन स्कोर को प्रायिकता में बदलने से पहले टेम्परेचर से भाग देता है: कम वैल्यू पर सबसे संभावित टोकन हावी रहता है, ज़्यादा वैल्यू पर वितरण सपाट हो जाता है और कम संभावित टोकन ज़्यादा बार चुने जाते हैं।

[base URL](https://broadrouter.com/hi/glossary/base-url/)

base URL किसी API का तय मूल पता है, जैसे https://api.example.com/v1, जिसे क्लाइंट /chat/completions जैसे हर एंडपॉइंट पाथ के आगे जोड़ता है। OpenAI-compatible SDK में base URL को API key और मॉडल ID के साथ बदलने से वही कोड किसी दूसरे प्रोवाइडर से जुड़ जाता है।

## अक्सर पूछे जाने वाले सवाल

### क्या ChatGPT या कोई दूसरा LLM अरबी व्याकरण सुधार सकता है?

हाँ, सीमाओं के साथ। QALB-2014 benchmark पर एक प्रकाशित टेस्ट में पाँच उदाहरणों वाले GPT-4 ने 65.49 F1 पाया, जो 67.70 वाले fine-tuned AraT5v2 के क़रीब पर उससे नीचे है। कम से कम बदलाव वाला प्रॉम्प्ट इस्तेमाल करें, जवाब कोड में जाँचें और अपने टेक्स्ट के सैंपल पर मापें।

### अरबी की सबसे आम वर्तनी ग़लतियाँ कौन-सी हैं?

alif पर hamza (أنا की जगह انا, إلى की जगह الى), alef maqsura को ya लिखना (مشى की जगह مشي), taa marbuta को ha लिखना (المدرسة की जगह المدرسه), और शब्दों को ग़लत तोड़ना या जोड़ना, जैसे وقابلت की जगह و قابلت। QALB के आयोजक hamza वाले alif और alef maqsura/ya की गड़बड़ी को सबसे आम बताते हैं।

### क्या अरबी टेक्स्ट normalization और वर्तनी सुधार एक ही चीज़ हैं?

नहीं। Normalization जान-बूझकर वर्तनी के रूपों, जैसे أ और ا, को मिला देता है ताकि सर्च और मिलान उन्हें नज़रअंदाज़ करें। सुधार तय करता है कि संदर्भ में कौन-सा रूप सही है। सुधार मूल टेक्स्ट पर चलाएँ, और सिर्फ़ उस कॉपी को normalize करें जिसे आप सर्च के लिए index करते हैं।

### अरबी व्याकरण सुधारक का मूल्यांकन कैसे करूँ?

100 से 200 असली वाक्यों को कम से कम बदलाव के साथ हाथ से सुधारें। source से gold और source से मॉडल आउटपुट तक के शब्द-स्तर के edits निकालें, फिर precision, recall और F0.5 के लिए मेल खाते edits गिनें। QALB में इस्तेमाल होने वाला M2 scorer यही काम बेहतर edit alignment के साथ करता है।

### क्या Python के लिए अरबी व्याकरण जाँचने वाली कोई लाइब्रेरी है?

सिर्फ़ वर्तनी के लिए, ar-corrector एक या दो edit के भीतर शब्दकोश के शब्द सुझाता है। व्याकरण के लिए CAMeL Lab रिसर्च वाले GEC मॉडल और कोड (arabic-gec) प्रकाशित करता है। LLM API शुरू करने का सबसे तेज़ तरीक़ा है; ज़्यादा वॉल्यूम पर fine-tuned मॉडल ज़्यादा एक जैसा हो सकता है।

## आगे पढ़ें

-   [सर्च और RAG के लिए अरबी टेक्स्ट normalization: क्या बदलें, क्या नहीं](https://broadrouter.com/hi/blog/arabic-text-normalization-search/)
-   [LLM से अरबी टेक्स्ट में हरकतें (तश्कील) लगाना: प्रॉम्प्ट, जाँच, DER](https://broadrouter.com/hi/blog/arabic-diacritization-llm/)
-   [अरबी प्रॉम्प्ट इंजीनियरिंग: register, RTL, अंक और मिला-जुला टेक्स्ट](https://broadrouter.com/hi/blog/arabic-prompt-engineering/)
-   [LLM से अरबी named entity extraction: JSON, तारीख़ें और जाँच](https://broadrouter.com/hi/blog/arabic-named-entity-extraction-llm/)
-   [अरबी के लिए LLM API कैसे चुनें: क्या-क्या टेस्ट करें](https://broadrouter.com/hi/blog/choosing-an-llm-for-arabic/)
-   [प्रोवाइडर बदलने से पहले LLM का मूल्यांकन कैसे करें](https://broadrouter.com/hi/blog/evaluate-llm-before-switching/)
-   [Batch API के बिना LLM बैच प्रोसेसिंग: दोबारा शुरू होने वाला runner](https://broadrouter.com/hi/blog/llm-batch-processing-without-batch-api/)
-   [अरबी रिकॉर्डिंग से मीटिंग मिनट्स: एक API पाइपलाइन](https://broadrouter.com/hi/blog/arabic-meeting-minutes-from-recordings/)
-   [अरबी OCR API की तुलना: Google, Azure, Textract, Mistral, LLM](https://broadrouter.com/hi/blog/arabic-ocr-api-comparison/)
-   [गाइड: BroadNet Inference के साथ OpenAI Python SDK इस्तेमाल करें](https://broadrouter.com/hi/guides/openai-python-sdk/)
-   [गाइड: रीज़निंग मॉडल ख़ाली जवाब क्यों लौटाता है](https://broadrouter.com/hi/guides/reasoning-tokens-empty-response/)

इसे अपने असली वर्कलोड पर आज़माएँ। नए अकाउंट Gemma और ट्रांसक्रिप्शन के लिए US$5 के क्रेडिट से शुरू होते हैं। DeepSeek, GLM, और Qwen3.8 के लिए टॉप-अप ज़रूरी है।

[शुरू करें](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=hi-blog-arabic-grammar-spelling-correction-llm&utm_content=page-cta) ·

**स्रोत**

-   [Mohit et al., The First QALB Shared Task on Automatic Text Correction for Arabic, EMNLP 2014 में ANLP workshop: डेटा, M2 scorer, तालिका 3 और तालिका 7 (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 और L2 tracks, तालिका 4, 8 और 9 (2026-11-15 को जाँचा गया)](https://aclanthology.org/W15-3204/)
-   [Kwon, Bhatia, Nagoudi और Abdul-Mageed, Beyond English: Evaluating LLMs for Arabic Grammatical Error Correction, ArabicNLP 2023, तालिका 2 (2026-11-15 को जाँचा गया)](https://aclanthology.org/2023.arabicnlp-1.9/)
-   [Alrehili और Alhothali, Tibyan Corpus: Balanced and Comprehensive Error Coverage Corpus Using ChatGPT for Arabic GEC, arXiv 2411.04588 (2026-11-15 को जाँचा गया)](https://arxiv.org/abs/2411.04588)
-   [Belkebir और Habash, Automatic Error Type Annotation for Arabic (ARETA), CoNLL 2021 (2026-11-15 को जाँचा गया)](https://aclanthology.org/2021.conll-1.47/)
-   [GitHub पर CAMeL Lab का ARETA (MIT): ALC पर आधारित error tags, जैसे OH hamza, OT ha/ta marbuta, OA alif/ya, MG merge, SP split (2026-11-15 को जाँचा गया)](https://github.com/CAMeL-Lab/arabic_error_type_annotation)
-   [Alhafni, Inoue, Khairallah और Habash, Advancements in Arabic Grammatical Error Detection and Correction, EMNLP 2023; कोड और मॉडल CAMeL-Lab/arabic-gec पर (2026-11-15 को जाँचा गया)](https://aclanthology.org/2023.emnlp-main.396/)
-   [GitHub पर NUS M2Scorer: GEC के लिए edit-स्तर precision, recall और F-beta; developer वर्ज़न को Python 2 चाहिए (2026-11-15 को जाँचा गया)](https://github.com/nusnlp/m2scorer)
-   [GitHub पर ERRANT: edits निकालकर M2 फ़ॉर्मैट में वर्गीकृत करता है; सिर्फ़ अंग्रेज़ी (2026-11-15 को जाँचा गया)](https://github.com/chrisjbryant/errant)
-   [PyPI पर ar-corrector: शब्दकोश वाला spell-checker, 500,000+ शब्द, 1-2 edit वाले विकल्प, अप्रैल 2021 का वर्ज़न 1.1.6 (2026-11-15 को जाँचा गया)](https://pypi.org/project/ar-corrector/)
-   [BroadNet Inference API रेफ़रंस: मॉडल IDs, reasoning max\_tokens में गिनी जाती है, reasoning\_effort (2026-11-15 को जाँचा गया) (अंग्रेज़ी में)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=hi-blog-arabic-grammar-spelling-correction-llm&utm_content=sources)
