{
  "name": "ToolBlur Arabic Text Normalization Test Corpus",
  "version": "1.0.0",
  "license": "CC BY 4.0",
  "updated": "2026-08-08",
  "purpose": "Transparent regression cases for conservative Arabic text normalization.",
  "rules": {
    "remove_diacritics": "Remove Arabic combining marks in U+0610–U+061A, U+064B–U+065F, U+0670 and U+06D6–U+06ED.",
    "remove_tatweel": "Remove ARABIC TATWEEL U+0640.",
    "normalize_alef": "Map إ, أ, آ and ٱ to ا.",
    "normalize_alef_maqsura": "Optionally map ى to ي.",
    "normalize_hamza_carriers": "Optionally map ؤ to و and ئ to ي.",
    "arabic_indic_digits": "Map ٠١٢٣٤٥٦٧٨٩ to 0123456789.",
    "clean_spaces": "Collapse repeated horizontal whitespace and trim spaces around line breaks."
  },
  "cases": [
    { "id": "marks-01", "rules": ["remove_diacritics"], "input": "اللُّغَةُ العَرَبِيَّةُ", "expected": "اللغة العربية", "note": "Common vowels and shadda are removed." },
    { "id": "quranic-mark-01", "rules": ["remove_diacritics"], "input": "هَٰذَا", "expected": "هذا", "note": "Superscript Alef is removed; keep the original for recitation or quotation." },
    { "id": "tatweel-01", "rules": ["remove_tatweel"], "input": "العــربية", "expected": "العربية", "note": "Decorative elongation is removed." },
    { "id": "alef-01", "rules": ["normalize_alef"], "input": "إلى أحمد وآمال", "expected": "الي احمد وامال", "note": "Alef variants are folded for matching, not spelling correction." },
    { "id": "wasla-01", "rules": ["normalize_alef"], "input": "ٱسم", "expected": "اسم", "note": "Alef Wasla is folded to bare Alef." },
    { "id": "maqsura-01", "rules": ["normalize_alef_maqsura"], "input": "فتى", "expected": "فتي", "note": "Optional aggressive rule; the normalized form is not publication spelling." },
    { "id": "hamza-carrier-01", "rules": ["normalize_hamza_carriers"], "input": "مسؤول بيئة", "expected": "مسوول بيية", "note": "Aggressive matching rule that removes orthographic distinctions." },
    { "id": "digits-01", "rules": ["arabic_indic_digits"], "input": "عام ٢٠٢٦", "expected": "عام 2026", "note": "Arabic-Indic digits are converted to ASCII digits." },
    { "id": "spaces-01", "rules": ["clean_spaces"], "input": "نص   عربي", "expected": "نص عربي", "note": "Repeated spaces collapse to one." },
    { "id": "line-space-01", "rules": ["clean_spaces"], "input": "السطر الأول  \n  السطر الثاني", "expected": "السطر الأول\nالسطر الثاني", "note": "Spaces around a preserved line break are removed." },
    { "id": "conservative-pipeline-01", "rules": ["remove_diacritics", "remove_tatweel", "normalize_alef", "arabic_indic_digits", "clean_spaces"], "input": "إِنَّ هــٰذا  نَصٌّ ١٢٣", "expected": "ان هذا نص 123", "note": "Default conservative ToolBlur pipeline." },
    { "id": "empty-01", "rules": ["remove_diacritics", "remove_tatweel", "normalize_alef", "arabic_indic_digits", "clean_spaces"], "input": "", "expected": "", "note": "Empty input remains empty." }
  ]
}
