مختبر صرفي بواجهات ذكية

كيف تعمل ArMorph

توثيق هندسة المعالجة الصرفية (قواعد + تعلّم آلي) مع التحقق البشري والتصدير التحليلي.

ظ
ðˤ
Flow: User → Processing & Cleaning → Tokenization → Confidence gate (≤τ → Rule-based | >τ → ML) → User Evaluation → Output (Confirmed) → Retrain ML
Hybrid AI pipeline combining Rule-based and ML with confidence (τ) gating, human validation, and a KPI-driven retraining loop (e.g., F1/accuracy on Arabic tokens) for continuous improvement.
خط أنابيب الذكاء الاصطناعي الهجين الذي يجمع بين القواعد والتعلّم الآلي مع بوابة (τ) قائمة على الثقة، والتحقق البشري، ودورة إعادة تدريب مدفوعة بمؤشرات الأداء الرئيسية (مثل F1/الدقة) لتحسينٍ مستمر.
Guide

1) Processing Pipeline

This page documents the operational flow implemented in the shared codebase:

  • Input The user pastes an Arabic passage (~300 tokens by default).
  • Processing & Cleaning Noise removal and normalization (surfaces a light UI for proclitic splits such as و/ف/ب/ك/ل/س).
  • Tokenization Robust Unicode tokenization into words/graphemes.
  • Confidence Gate τ A decision node dispatches tokens to:
    • Rule-based system (deterministic) – classic scripts loaded first: POS, patterns, roots, gender, laa, number, lemma, case, definiteness, particle/adverb types, syllables.
    • ML system (probabilistic) – an overlay that offers suggestions and learning endpoints.
  • User Evaluation A human reviews/edits outputs within the lab panels; edits are tracked and can be fed back to ML.
  • Confirmed Output Export to JSON/CSV via the exporter.
  • Feedback Loop Confirmed rows are sent to feedback and opportunistically trained for continuous learning.

2) What ArMorph aims to do

ArMorph provides a research-grade, dialect-aware Arabic morphological/phonological workbench. It combines interpretable linguistic rules (transparency, reproducibility) with ML-based assistive predictions (coverage, generalization). A human verifier remains central (human-in-the-loop AI), ensuring reliability and generating gold data that improves the models over time.

3) ML Overlay & API

The floating toolbar (ظ-style) exposes:

  • Capability + gate state.
  • Per-cell predictions for targets such as ipa, pos, definiteness, case, gender, number, laa, pattern, root, lemma, particle_type, adverb_type, syllable, stress, mora, split_decision.
  • Feedback endpoint (authorized when enabled) to append validated rows.
  • On-demand training; supports dialect scoping (e.g., MSA, HIJAZI).

4) Export Formats

CSV (flat, analysis-friendly)

index,token,line_index,position_text,sentence_index,token_position_in_sentence,
ipa,pos,laa_type,number_value,case_value,definiteness_value,
gender,pattern_value,root,root_count,
particle_type_value,particle_type_free,
adverb_type_value,adverb_type_free,
lemma_value,
syllable_value,syllable_count,stress_value,mora_value,
dialect_value,dialect_label,dialect_other_text,dialect_code

Notes:

  • syllable_count is computed from dot-separated syllable value.
  • Dialect is stored as both human labels and a normalized code (e.g., MSA, HIJAZI).

Analytics CSV (coded)

schema_version,index,token,line_index,position_text,sentence_index,token_position_in_sentence,
ipa,
pos,pos_code,laa_type,laa_code,number_value,number_code,
case_value,definiteness_value,definiteness_code,
gender,gender_code,
pattern_value,pattern_code,pattern_code_source,pattern_family,
root_value,root_code,root_count,
particle_type_value,particle_type_code,particle_type_free,
adverb_type_value,adverb_type_code,adverb_type_free,
lemma_value,lemma_code,
syllable_value,syllable_count,stress_value,mora_value,
dialect_value,dialect_label,dialect_other_text,dialect_code

JSON

{
  "count": <int>,
  "tokens": [
    {
      "index": 1,
      "token": "وَخَالِد",
      "ipa": "wa xaːlid",
      "pos": "PART+PROPN",
      "laa_type": "",
      "number_value": "",
      "case_value": "ACC",
      "definiteness_value": "DEF",
      "gender": "MASC",
      "pattern_value": "CaCaCiC",
      "root": "خ ل د",
      "root_count": 3,
      "particle_type_value": "COORD",
      "adverb_type_value": "",
      "lemma_value": "خالد",
      "syllable_value": "wa.xaa.lid",
      "stress_value": "xáa",
      "mora_value": "μμ…",
      "dialect_value": "HIJAZI",
      "dialect_code": "HIJAZI"
    }
  ]
}
الدليل

١) مسار التشغيل

يعكس هذا الدليل تنفيذ ArMorph كما في الملفات المرفقة:

  • الإدخال يلصق المستخدم نصًا عربيًا (~٣٠٠ كلمة افتراضيًا).
  • المعالجة الأولية والتنظيف إزالة الضوضاء والتطبيع، مع واجهة خفيفة لاقتراح فصل اللواصق مثل و/ف/ب/ك/ل/س.
  • التجزئة تقطيع موحّد.
  • عقدة القرار (عتبة الثقة τ) التوجيه حسب الثقة:
    • نظام قاعدي — قواعد POS، الأوزان، الجذور، النوع، نوع اللام، العدد، اللِمّة، الإعراب، التعريف، أنواع الحروف/الظروف، المقطعية…
    • نظام تعلمي — طبقة اقتراح/تعلّم.
  • التقييم البشري الإنسان ضمن الحلقة.
  • المخرجات المعتمدة تصدير JSON/CSV.
  • التغذية الراجعة إرسال الصفوف إلى feedback وtrain.

٢) أهداف ArMorph

ArMorph منصة بحثية هجينة تجمع القواعد اللغوية مع التعلم الآلي مع مراعاة التنوع اللهجي. يبقى الاعتماد النهائي للخبير البشري وينتج بيانات ذهبية لتحسين النماذج.

٣) طبقة التعلّم الآلي وواجهاته

  • اقتراح — اقتراحات لكل خلية (IPA، POS، التعريف، الإعراب، النوع، العدد، نوع اللام، الوزن، الجذر، اللِمّة، نوع الحرف/الظرف، المقطعية، النبر، المورا، قرار الفصل).
  • تغذية رجعية — حفظ التصحيحات (قد يتطلب رمزًا).
  • تدريب — تدريب فوري مع تقييد باللهجة.

٤) صيغ الإخراج

CSV (مبسّط لتحليل إحصائي)

index,token,line_index,position_text,sentence_index,token_position_in_sentence,
ipa,pos,laa_type,number_value,case_value,definiteness_value,
gender,pattern_value,root,root_count,
particle_type_value,particle_type_free,
adverb_type_value,adverb_type_free,
lemma_value,
syllable_value,syllable_count,stress_value,mora_value,
dialect_value,dialect_label,dialect_other_text,dialect_code
  • syllable_count يُحسب من syllable value المفصول بنقاط.
  • تُخزَّن اللهجة بملصق بشري وكود موحّد.

CSV تحليلي (coding)

schema_version,index,token,line_index,position_text,sentence_index,token_position_in_sentence,
ipa,
pos,pos_code,laa_type,laa_code,number_value,number_code,
case_value,definiteness_value,definiteness_code,
gender,gender_code,
pattern_value,pattern_code,pattern_code_source,pattern_family,
root_value,root_code,root_count,
particle_type_value,particle_type_code,particle_type_free,
adverb_type_value,adverb_type_code,adverb_type_free,
lemma_value,lemma_code,
syllable_value,syllable_count,stress_value,mora_value,
dialect_value,dialect_label,dialect_other_text,dialect_code

JSON (نقل إلى الحافظة/تنزيل)

{
  "count": <عدد العناصر>,
  "tokens": [ { ... نفس الحقول المسطّرة في CSV ... } ]
}

References • المراجع

  1. Abdo, D. A. Stress and Arabic Phonology. University of Illinois, 1969.
  2. Abu-Mansour, M. “Vowel Shortening in Two Arabic Dialects.” In Perspectives on Arabic Linguistics IV, John Benjamins, 2011.
  3. Abu-Mansur, M. A Nonlinear Analysis of Arabic Syllabic Phonology. PhD, University of Florida, 1987.
  4. Abu-Mansur, M. “Closed Syllable Shortening …” In Perspectives on Arabic Linguistics IV, 1992.
  5. Abu-Mansur, M. “Optimality and Conspiracy …” In Papers in OT, UMOP 18, 1996.
  6. Ahyad, H., & Becker, M. “Vowel Unpredictability in Hijazi Arabic Monosyllabic Verbs.” Glossa 5(1), 2020.
  7. Al-Ageli, H. Syllabic and Metrical Structure in Tripolitanian Arabic. PhD, Essex, 1995.
  8. Al-Ageli, H., & Roca, I. “Word Edges in MSA …” MS, Essex, 1995.
  9. Al-Ani, S. Arabic Phonology. Mouton, 1970.
  10. Al-Kaabi, M., & Ntelitheos, D. “Rethinking Templates … Emirati Arabic.” Glossa 4(1), 2019.
  11. Al-Mohanna, F. “Gradual Vowel Epenthesis in Urban Hijazi Arabic.” Languages 6(4), 2021.
  12. Al-Mozainy, H. Vowel Alternations in a Bedouin Hijazi Dialect. PhD, UT Austin, 1981.
  13. Al Solami, M. “The Metrical System of a Bedouin Hijazi Dialect.” SKASE JTL 19(1), 2022.
  14. Almurashi, W., Al-Tamimi, J., & Khattab, G. “Dynamic Specification of Vowels in Hijazi Arabic.” Phonetica 81(2), 2024.
  15. Alfaifi, A. Syllabification of Coda Consonant Clusters in Najdi and Hijazi Arabic. PhD, GMU, 2019.
  16. Alzaidi, M. “Makkan Arabic Does Not Have Post-Focus Compression.” Phonetica 79(3), 2022.
  17. Alzaidi, M., Xu, Y., & Xu, A. “Prosodic Encoding of Focus in Hijazi Arabic.” Speech Communication 106, 2019.
  18. Alzaidi, M. S. A., et al. “Computational Modelling of Emirati Arabic Intonation.” Journal of Phonetics 98, 2023.
  19. Beeston, A. F. L. The Arabic Language Today. Routledge, 2016.
  20. Bakala, M. H. Phonology and Morphology of Meccan Arabic. PhD, London, 1973; and The Morphological and Phonological Component of the Arabic Verb. Longman, 1979.
  21. Bernouss, M. R. “Moroccan Arabic Syllable Structure.” Lingua et Linguistica 1, 2007.
  22. Blodgett, A., Owens, J., & Rockwood, T. “Intonation of Emirati Arabic.” ICPhS XVI, 2007.
  23. Brame, M. K. Arabic Phonology. PhD, MIT, 1970.
  24. Broselow, E. The Phonology of Egyptian Arabic. PhD, UMass Amherst, 1976; 1979; 1980; 1992.
  25. Garbell, I. “Remarks on the Historical Phonology of an East Mediterranean Arabic Dialect.” Word 14(2–3), 1958.
  26. Holes, C. Modern Arabic: Structures, Functions, and Varieties. Georgetown, 2004.
  27. Hwaidi, T. Syllable Structure and Syllabification in Al’ain Libyan Arabic. PhD, Newcastle, 2016.
  28. Kabrah, R. “Stress Assignment in Makkan Arabic: A Stratal-OT Analysis.” In Perspectives on Arabic Linguistics XXIV–XXV, 2014.
  29. Kelly, N. “Syllable Weight, Vowel Length and Focus in Lebanese Arabic.” Glossa 6(1), 2021.
  30. Lahrouchi, M. “Syllable Structure and Vowel/Zero Alternations in Moroccan Arabic and Berber.” In Routledge Handbook of African Linguistics, 2018.
  31. McCarthy, J. J. Formal Problems in Semitic Phonology and Morphology. Routledge, 2018.
  32. McCarthy, J., & Prince, A. “Prosodic and Templatic Morphology.” In Perspectives on Arabic Linguistics, 2011.
  33. Owens, J. “The Syllable as Prosody … Eastern Libyan Arabic.” BSOAS 43(2), 1980; Owens (ed.) Oxford Handbook of Arabic Linguistics, 2013.
  34. Szreder, M., & Derrick, D. “Affricate Variability in Emirati Arabic.” JIPA 54(1), 2024.
  35. Turner, M. “Moroccan Arabic.” In The Semitic Languages. Routledge, 2019.
  36. Versteegh, K. Arabic Language. Edinburgh UP, 2014.
  37. Watson, J. C. E. The Phonology and Morphology of Arabic. OUP, 2002; and “South Arabian and Arabic Dialects.” In Arabic Historical Dialectology, 2018.