| name | arabic-text-repair |
| description | Skill for detecting, repairing, and standardizing Arabic text typography, fixing inverted punctuation, Tatweel/Kashida normalization, digit formatting (Eastern/Western), and Alef/Yeh forms. |
Arabic Text Repair & Typography Skill
This skill guides the automated detection, diagnosis, and precision repair of Arabic text defects and formatting inconsistencies before insertion into Microsoft Word documents.
1. Common Defects & Diagnostic Criteria
-
Inverted Parentheses & Punctuation Marks:
- In mixed Arabic/Latin contexts or numeric parentheticals, punctuation marks such as
(, ), [, ], . frequently flip orientation in Word.
- Solution: Set
fixInvertedPunctuation: true.
-
Digit Format Inconsistency:
- Documents mixing Western numerals (
1, 2, 3) with Eastern Arabic numerals (١, ٢, ٣).
- Solution: Standardize across the document via
standardizeDigits: 'eastern' (or 'western').
-
Alef & Dotless Yeh Standardization:
- Unifying hamza forms on Alef (
أ, إ, آ -> ا) or normalizing final Yeh (ى -> ي).
- Solution: Enable
normalizeAlef: true and/or normalizeYeh: true.
-
Excess Kashida (Tatweel) Removal:
- Stripping unwanted tatweel (
ـ) characters from extracted OCR or legacy text.
- Solution: Set
removeKashida: true.
2. Execution via MCP Tool
{
"tool": "repair_arabic_text_formatting",
"arguments": {
"text": "النص العربي المراد فحصه وإصلاحه (123) ـتـجـربـةـ",
"fixInvertedPunctuation": true,
"standardizeDigits": "eastern",
"trimExtraSpaces": true,
"normalizeAlef": false,
"normalizeYeh": false,
"removeKashida": true
}
}