youssefreda9 commited on
Commit
a84aad9
·
1 Parent(s): 2e1a2e5

update benchmark logs

Browse files
debug_pc002.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import logging
2
+ from src.nlp.spelling.araspell_rules import AraSpellPostProcessor
3
+
4
+ # Mock original and result
5
+ original = "الولاد يلعبون بالشاروع"
6
+ result = "الأولاد يلعبون ب الشارع"
7
+
8
+ orig_standalone = set(w for w in original.split() if len(w) == 1)
9
+ orig_words = original.split()
10
+ res_words_list = result.split()
11
+
12
+ print(f"Original: {orig_words}")
13
+ print(f"Result: {res_words_list}")
14
+
15
+ for idx, w in enumerate(res_words_list):
16
+ if len(w) == 1 and w not in orig_standalone:
17
+ if w in 'واتيبلفك':
18
+ is_prefix_separation = False
19
+ if w in 'وفبلك' and idx + 1 < len(res_words_list):
20
+ next_word = res_words_list[idx + 1]
21
+ combined = w + next_word
22
+ for ow in orig_words:
23
+ if ow.startswith(w) and len(ow) > 2:
24
+ print(f" Match! ow={ow}, w={w}, combined={combined}")
25
+ is_prefix_separation = True
26
+ break
27
+
28
+ if not is_prefix_separation:
29
+ print(f"[SPELLING] Blocked destructive tokenization '{w}'")
30
+ result = original
31
+ break
32
+
33
+ print(f"Final result: {result}")
debug_pc023.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import difflib
2
+ import re
3
+
4
+ def get_word_positions(text):
5
+ positions = []
6
+ for m in re.finditer(r'\S+', text):
7
+ positions.append((m.group(), m.start(), m.end()))
8
+ return positions
9
+
10
+ # Simulate what happens in the pipeline:
11
+ # Spelling changes القصه→القصة but NOT طويل or ومملل
12
+ # So current_text becomes: القصة طويل ومملل (if spelling fixed القصه)
13
+ # But wait - from the logs, grammar input was: القصه طويل ومملل
14
+ # That means spelling didn't fix القصه either. But the benchmark shows
15
+ # a spelling suggestion [0:5] 'القصه'→'القصة'. So spelling DID produce a patch.
16
+
17
+ # Grammar runs on spelling-corrected text.
18
+ # If spelling fixed القصه→القصة, grammar input would be: القصة طويل ومملل
19
+ grammar_input = "القصة طويل ومملل"
20
+ grammar_output = "القصة طويلة ومملة"
21
+
22
+ print(f"Grammar Input: '{grammar_input}' (len={len(grammar_input)})")
23
+ print(f"Grammar Output: '{grammar_output}' (len={len(grammar_output)})")
24
+
25
+ orig_words = get_word_positions(grammar_input)
26
+ corr_words = get_word_positions(grammar_output)
27
+
28
+ print(f"\nInput words:")
29
+ for w, s, e in orig_words:
30
+ print(f" '{w}' [{s}:{e}]")
31
+
32
+ print(f"\nOutput words:")
33
+ for w, s, e in corr_words:
34
+ print(f" '{w}' [{s}:{e}]")
35
+
36
+ s = difflib.SequenceMatcher(None, [w[0] for w in orig_words], [w[0] for w in corr_words])
37
+ print(f"\nOpcodes:")
38
+ for tag, i1, i2, j1, j2 in s.get_opcodes():
39
+ print(f" {tag}: orig_words[{i1}:{i2}] vs corr_words[{j1}:{j2}]")
40
+ if tag != 'equal':
41
+ start_char = orig_words[i1][1]
42
+ end_char = orig_words[i2-1][2]
43
+ orig_slice = grammar_input[start_char:end_char]
44
+ corr_text = " ".join([w[0] for w in corr_words[j1:j2]])
45
+ print(f" [{start_char}:{end_char}] '{orig_slice}' → '{corr_text}'")
46
+
47
+ # Now map back to ORIGINAL text coordinates
48
+ # Original text: القصه طويل ومملل (len=16)
49
+ # After spelling: القصة طويل ومملل (len=16) — same length!
50
+ # Grammar diff on current: [5:16] 'طويل ومملل' → 'طويلة ومملة'
51
+ # Mapped to original: same since no length change from spelling
extract_failures.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ with open('tests/phase10/reports/collision_benchmark_results.json', 'r', encoding='utf-8') as f:
4
+ data = json.load(f)
5
+
6
+ failures = [r for r in data['results'] if r.get('pipeline_verdict') != 'TP']
7
+
8
+ print(f"Total failures: {len(failures)}\n")
9
+
10
+ for i, r in enumerate(failures, 1):
11
+ print(f"{'─'*100}")
12
+ print(f"#{i} {r['id']} | Category: {r['category']}")
13
+ print(f" INPUT: '{r['input']}'")
14
+ print(f" EXPECTED: '{r['expected']}'")
15
+ print(f" GOT: '{r['pipeline_output']}'")
16
+
17
+ # What's wrong?
18
+ exp_words = set(r['expected'].rstrip('.').split())
19
+ got_words = set(r['pipeline_output'].rstrip('.').split())
20
+ missing = exp_words - got_words
21
+ extra = got_words - exp_words
22
+ if missing:
23
+ print(f" MISSING WORDS: {missing}")
24
+ if extra:
25
+ print(f" EXTRA WORDS: {extra}")
26
+
27
+ # Suggestions
28
+ if r.get('pipeline_suggestions'):
29
+ for s in r['pipeline_suggestions']:
30
+ print(f" [{s['type']:12}] '{s['original']}' → '{s['correction']}' [{s['start']}:{s['end']}]")
31
+
32
+ print(f" ROOT CAUSE: {r.get('root_cause_detail', 'N/A')}")
33
+ print()
extract_pc023.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import re
2
+
3
+ log_content = ""
4
+ with open("C:/Users/youss/.gemini/antigravity-ide/brain/537b42ea-8124-47c1-ae12-68846ff19964/.system_generated/tasks/task-5329.log", "r", encoding="utf-8") as f:
5
+ log_content = f.read()
6
+
7
+ # The logs are interleaved, but they should be sequential. We want to find the section where it processes PC023.
8
+ # Input is "القصه طويل ومملل"
9
+ lines = log_content.splitlines()
10
+ in_pc023 = False
11
+ for line in lines:
12
+ if "القصه طويل ومملل" in line or "القصة طويلة ومملة" in line or "طويل وممل" in line:
13
+ print(line)
src/nlp/grammar/grammar_rules.py CHANGED
@@ -811,11 +811,8 @@ class ArabicGrammarGuard:
811
  # Common words ending in ا that should NOT get tanween
812
  _NO_TANWEEN = {
813
  'ما', 'إذا', 'هذا', 'أنا', 'إلى', 'على', 'حتى', 'متى', 'لما',
814
- 'إلا', 'أما', 'كما', 'ربما', 'مهما', 'أيضا', # أيضا is debatable
815
- 'عندما', 'بينما', 'حينما', 'كلما', 'عموما',
816
- 'دائما', 'سابقا', 'لاحقا', 'حاليا', 'تقريبا',
817
- 'وفقا', 'نظرا', 'استنادا', 'خصوصا', 'عموما',
818
- 'مباشرا',
819
  }
820
  # Words that ALWAYS get tanween
821
  _ALWAYS_TANWEEN = {
@@ -838,6 +835,34 @@ class ArabicGrammarGuard:
838
  'غالبا': 'غالباً',
839
  'أحيانا': 'أحياناً',
840
  'مثلا': 'مثلاً',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
841
  }
842
  words = text.split()
843
  for i, w in enumerate(words):
@@ -866,11 +891,31 @@ class ArabicGrammarGuard:
866
  'اخرج': 'أخرج', 'اخرجت': 'أخرجت', 'اخرجوا': 'أخرجوا',
867
  'انشأ': 'أنشأ', 'انشأت': 'أنشأت', 'انشأوا': 'أنشأوا',
868
  'اضاف': 'أضاف', 'اضافت': 'أضافت', 'اضافوا': 'أضافوا',
 
 
 
 
 
869
  'الامهات': 'الأمهات', 'الاطفال': 'الأطفال',
870
  'الامة': 'الأمة', 'الاستاذ': 'الأستاذ',
871
  }
 
 
 
 
 
 
 
 
872
  words = text.split()
873
  for i, w in enumerate(words):
874
  if w in _HAMZA_FIXES:
875
  words[i] = _HAMZA_FIXES[w]
 
 
 
 
 
 
 
876
  return ' '.join(words)
 
811
  # Common words ending in ا that should NOT get tanween
812
  _NO_TANWEEN = {
813
  'ما', 'إذا', 'هذا', 'أنا', 'إلى', 'على', 'حتى', 'متى', 'لما',
814
+ 'إلا', 'أما', 'كما', 'ربما', 'مهما',
815
+ 'عندما', 'بينما', 'حينما', 'كلما',
 
 
 
816
  }
817
  # Words that ALWAYS get tanween
818
  _ALWAYS_TANWEEN = {
 
835
  'غالبا': 'غالباً',
836
  'أحيانا': 'أحياناً',
837
  'مثلا': 'مثلاً',
838
+ 'قرارا': 'قراراً',
839
+ 'جديدا': 'جديداً',
840
+ 'كبيرا': 'كبيراً',
841
+ 'صغيرا': 'صغيراً',
842
+ 'طويلا': 'طويلاً',
843
+ 'قصيرا': 'قصيراً',
844
+ 'سريعا': 'سريعاً',
845
+ 'بطيئا': 'بطيئاً',
846
+ 'جيدا': 'جيداً',
847
+ 'سيئا': 'سيئاً',
848
+ 'عظيما': 'عظيماً',
849
+ 'قويا': 'قوياً',
850
+ 'ضعيفا': 'ضعيفاً',
851
+ 'صعبا': 'صعباً',
852
+ 'سهلا': 'سهلاً',
853
+ 'هاما': 'هاماً',
854
+ 'نهائيا': 'نهائياً',
855
+ 'رسميا': 'رسمياً',
856
+ 'تماما': 'تماماً',
857
+ 'عاجلا': 'عاجلاً',
858
+ 'أولا': 'أولاً',
859
+ 'ثانيا': 'ثانياً',
860
+ 'ثالثا': 'ثالثاً',
861
+ 'أخيرا': 'أخيراً',
862
+ 'حقا': 'حقاً',
863
+ 'حقيقيا': 'حقيقياً',
864
+ 'علميا': 'علمياً',
865
+ 'عمليا': 'عملياً',
866
  }
867
  words = text.split()
868
  for i, w in enumerate(words):
 
891
  'اخرج': 'أخرج', 'اخرجت': 'أخرجت', 'اخرجوا': 'أخرجوا',
892
  'انشأ': 'أنشأ', 'انشأت': 'أنشأت', 'انشأوا': 'أنشأوا',
893
  'اضاف': 'أضاف', 'اضافت': 'أضافت', 'اضافوا': 'أضافوا',
894
+ 'احب': 'أحب', 'احبت': 'أحبت', 'احبوا': 'أحبوا',
895
+ 'افهم': 'أفهم', 'افهمت': 'أفهمت', 'افهموا': 'أفهموا',
896
+ 'اعجب': 'أعجب', 'اعجبت': 'أعجبت', 'اعجبوا': 'أعجبوا',
897
+ 'اكرم': 'أكرم', 'اكرمت': 'أكرمت', 'اكرموا': 'أكرموا',
898
+ 'انقذ': 'أنقذ', 'انقذت': 'أنقذت', 'انقذوا': 'أنقذوا',
899
  'الامهات': 'الأمهات', 'الاطفال': 'الأطفال',
900
  'الامة': 'الأمة', 'الاستاذ': 'الأستاذ',
901
  }
902
+ _HAMZA_STEMS = {
903
+ 'احب': 'أحب', 'افهم': 'أفهم', 'اعلن': 'أعلن',
904
+ 'اصدر': 'أصدر', 'اسلم': 'أسلم', 'اكد': 'أكد',
905
+ 'انجز': 'أنجز', 'ارسل': 'أرسل', 'اخرج': 'أخرج',
906
+ 'اضاف': 'أضاف', 'اعجب': 'أعجب', 'اكرم': 'أكرم',
907
+ 'انقذ': 'أنقذ',
908
+ }
909
+ _PRONOUN_SUFFIXES = {'ه', 'ها', 'ك', 'كم', 'كن', 'هم', 'هن', 'ني', 'نا'}
910
  words = text.split()
911
  for i, w in enumerate(words):
912
  if w in _HAMZA_FIXES:
913
  words[i] = _HAMZA_FIXES[w]
914
+ continue
915
+ for stem, fixed in _HAMZA_STEMS.items():
916
+ if w.startswith(stem) and len(w) > len(stem):
917
+ suffix = w[len(stem):]
918
+ if suffix in _PRONOUN_SUFFIXES:
919
+ words[i] = fixed + suffix
920
+ break
921
  return ' '.join(words)
src/nlp/spelling/araspell_rules.py CHANGED
@@ -1656,8 +1656,8 @@ class ArabicSpellChecker:
1656
  rw = res_words_list[idx]
1657
  # If the word didn't start with م but the correction does, and it looks like a plural verb
1658
  if not ow.startswith('م') and rw.startswith('م') and rw[1:] == ow and ow.endswith('و'):
1659
- logger.info(f"[SPELLING] Blocked morphological mutation (verb→noun '{ow}'→'{rw}'): '{original}' -> '{result}'")
1660
- result = original
1661
- break
1662
 
1663
  return result
 
1656
  rw = res_words_list[idx]
1657
  # If the word didn't start with م but the correction does, and it looks like a plural verb
1658
  if not ow.startswith('م') and rw.startswith('م') and rw[1:] == ow and ow.endswith('و'):
1659
+ logger.info(f"[SPELLING] Blocked morphological mutation (verb→noun '{ow}'→'{rw}')")
1660
+ res_words_list[idx] = ow
1661
+ result = ' '.join(res_words_list)
1662
 
1663
  return result
test_camel.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from camel_tools.tokenizers.word import simple_word_tokenize
2
+ from camel_tools.disambig.mle import MLEDisambiguator
3
+
4
+ mle = MLEDisambiguator.pretrained()
5
+ text = "كان المعلمون نائمين"
6
+ tokens = simple_word_tokenize(text)
7
+ disambig_tokens = mle.disambiguate(tokens)
8
+
9
+ for t in disambig_tokens:
10
+ if t.analyses:
11
+ a = t.analyses[0].analysis
12
+ print(f"Word: {t.word}, POS: {a.get('pos')}, Case: {a.get('cas')}, Form: {a.get('diac')}")
test_colon.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import re
2
+
3
+ def add_colons(text):
4
+ pattern = r'\b(قال|يقول|قالت|تقول|سأل|سألت|أجاب|أجابت|صرح|صرحت|أضاف|أضافت)\s+(ال[أ-ي]+|[أ-ي]+\s+ال[أ-ي]+|أحمد|محمد|محمود|علي|عمر)\b(?!\s*:)'
5
+ return re.sub(pattern, r'\1 \2:', text)
6
+
7
+ cases = [
8
+ "قال المعلم يقدر المجتمع",
9
+ "قالت أمي نظف غرفتك", # Won't match أمي
10
+ "أجاب الطالب لا أعرف",
11
+ "قال نعم", # Won't match نعم
12
+ "صرح وزير الخارجية بأن", # Matches وزير الخارجية
13
+ ]
14
+
15
+ for c in cases:
16
+ print(add_colons(c))
test_grammar_fast.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+ import os
3
+ sys.path.append(os.path.abspath('src'))
4
+ from nlp.spelling.araspell_service import get_spelling_model
5
+ from nlp.grammar.grammar_service import get_grammar_model
6
+
7
+ def test_fast():
8
+ spell_checker = get_spelling_model()
9
+ grammar_checker = get_grammar_model()
10
+
11
+ cases = {
12
+ # الأسماء الخمسة
13
+ "[الأسماء الخمسة] فاعل مرفوع بالواو": "جاء أباك مسرعاً",
14
+ "[الأسماء الخمسة] مفعول به منصوب بالألف": "رأيت أبوك في المسجد",
15
+ "[الأسماء الخمسة] اسم مجرور بالياء": "مررت بأخوك أمس",
16
+ "[الأسماء الخمسة] مبتدأ مرفوع بالواو": "ذا العلم محترم",
17
+
18
+ # العدد والمعدود
19
+ "[العدد والمعدود] 3-10 مخالفة (مؤنث)": "اشتريت ثلاثة سيارات",
20
+ "[العدد والمعدود] 3-10 مخالفة (مذكر)": "عندي سبع أقلام",
21
+ "[العدد والمعدود] تمييز مفرد منصوب (11-99)": "في الفصل عشرون طالب",
22
+ "[العدد والمعدود] العددان 1 و 2 يوافقان": "حضر رجلان اثنتان",
23
+
24
+ # الأفعال الخمسة
25
+ "[الأفعال الخمسة] ثبوت النون (مرفوع)": "الطلاب يذاكروا بجد",
26
+ "[الأفعال الخمسة] حذف النون (منصوب بلن)": "الطلاب لن يذاكرون",
27
+ "[الأفعال الخمسة] حذف النون (مجزوم بلم)": "أنتِ لم تذهبين",
28
+ "[الأفعال الخمسة] ثبوت النون (مرفوع للمخاطبة)": "أنتِ تلعبي جيداً"
29
+ }
30
+
31
+ print("=== Testing Grammar Rules (Advanced) ===")
32
+ for desc, text in cases.items():
33
+ print(f"\n{desc}")
34
+ print(f"Input : {text}")
35
+
36
+ # 1. Spell Check
37
+ spelled_text = spell_checker.correct(text)
38
+
39
+ # 2. Grammar Check
40
+ final_text = grammar_checker.correct(spelled_text)
41
+
42
+ print(f"Output: {final_text}")
43
+
44
+ if __name__ == '__main__':
45
+ test_fast()
test_grammar_rules.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ import os
3
+ import sys
4
+
5
+ # Add src to path
6
+ sys.path.append(os.path.abspath('src'))
7
+
8
+ from app import analyze_text
9
+
10
+ def test_grammar_cases():
11
+ cases = {
12
+ "1. النعت والمنعوت (تذكير/تأنيث)": "رأيت سيارة جميل",
13
+ "2. العدد والمعدود (من 3-10)": "اشتريت ثلاثة سيارات",
14
+ "3. حروف الجر (مجرور)": "ذهبت إلى المهندسون",
15
+ "4. الأسماء الخمسة (مفعول به منصوب)": "رأيت أبوك",
16
+ "5. المضاف والمضاف إليه (جر)": "جاء مدير الشركةَ",
17
+ "6. التاء المربوطة والهاء": "هذة مدرسة كبيرة"
18
+ }
19
+
20
+ print("=== Testing Grammar Rules ===")
21
+ for desc, text in cases.items():
22
+ print(f"\n[{desc}]")
23
+ print(f"Input : {text}")
24
+
25
+ # We need to run analyze_text which is async? No, it's a normal function if we look at the code, wait, let's check.
26
+ # Actually app.analyze_text might not be async, let's call it.
27
+ try:
28
+ result, _ = analyze_text(text)
29
+
30
+ # The result is a list of suggestions.
31
+ # Let's apply them to get the final text.
32
+ corrected = text
33
+ # Sort suggestions by start index descending to not mess up offsets
34
+ for sugg in sorted(result, key=lambda x: x['start'], reverse=True):
35
+ corrected = corrected[:sugg['start']] + sugg['correction'] + corrected[sugg['end']:]
36
+
37
+ print(f"Output: {corrected}")
38
+ print(f"Diffs : {result}")
39
+ except Exception as e:
40
+ print(f"Error : {e}")
41
+
42
+ if __name__ == '__main__':
43
+ test_grammar_cases()
test_kana.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from camel_tools.tokenizers.word import simple_word_tokenize
2
+ from camel_tools.disambig.mle import MLEDisambiguator
3
+
4
+ def check_cases():
5
+ mle = MLEDisambiguator.pretrained()
6
+ text = "كان المعلمين نائمين"
7
+ tokens = simple_word_tokenize(text)
8
+ disambig_tokens = mle.disambiguate(tokens)
9
+ for t in disambig_tokens:
10
+ if t.analyses:
11
+ a = t.analyses[0].analysis
12
+ print(f"Word: {t.word}, POS: {a.get('pos')}, Case: {a.get('cas')}, Num: {a.get('num')}")
13
+
14
+ if __name__ == '__main__':
15
+ check_cases()
test_local.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import asyncio
3
+ import json
4
+ import sys
5
+
6
+ # Mock dotenv loading since it fails on Windows with embedded nulls
7
+ import dotenv
8
+ dotenv.load_dotenv = lambda *args, **kwargs: None
9
+ os.environ["QURAN_DB_PATH"] = "dummy"
10
+
11
+ sys.path.append(os.path.abspath('src'))
12
+ from app import analyze_text
13
+
14
+ async def run_test():
15
+ res = await analyze_text("المهندسون صممتو المشروع")
16
+ print("PC001:", res.get("text_corrected"))
17
+
18
+ res2 = await analyze_text("القصه طويل ومملل")
19
+ print("PC023:", res2.get("text_corrected"))
20
+
21
+ res3 = await analyze_text("الشمس مشرق اليووم")
22
+ print("PC014:", res3.get("text_corrected"))
23
+
24
+ if __name__ == "__main__":
25
+ asyncio.run(run_test())
test_mapper.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from src.app import OffsetMapper
2
+
3
+ original_text = "القصه طويل ومملل"
4
+ spelling_text = "القصة طويل وممل"
5
+
6
+ mapper = OffsetMapper(original_text, spelling_text)
7
+
8
+ # Grammar patch on spelling_text is [6:15]
9
+ # Let's see what it maps to in original text
10
+ start_orig = mapper.reverse_map_offset(6)
11
+ end_orig = mapper.reverse_map_offset(15)
12
+
13
+ print(f"Grammar patch [6:15] mapped to [{start_orig}:{end_orig}]")
14
+ print(f"Original text at [{start_orig}:{end_orig}]: '{original_text[start_orig:end_orig]}'")
test_mapper_isolated.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import difflib
2
+
3
+ class OffsetMapper:
4
+ def __init__(self, text_before, text_after):
5
+ self._text_before = text_before
6
+ self._text_after = text_after
7
+ self._opcodes = []
8
+ s = difflib.SequenceMatcher(None, self._text_before, self._text_after)
9
+ for tag, i1, i2, j1, j2 in s.get_opcodes():
10
+ self._opcodes.append((tag, i1, i2, j1, j2))
11
+
12
+ def reverse_map_offset(self, pos_in_after, is_end=False):
13
+ """Map a single position from text_after → text_before."""
14
+ # Find all opcodes where the position falls inside [j1, j2]
15
+ matches = []
16
+ for tag, i1, i2, j1, j2 in self._opcodes:
17
+ if j1 <= pos_in_after <= j2:
18
+ matches.append((tag, i1, i2, j1, j2))
19
+
20
+ if not matches:
21
+ return len(self._text_before)
22
+
23
+ # If there's an ambiguity (multiple opcodes touch this point),
24
+ # or if the point falls exactly on the boundary of a deletion.
25
+
26
+ # Calculate the mapped position for each match
27
+ mapped_positions = []
28
+ for tag, i1, i2, j1, j2 in matches:
29
+ if j2 == j1: # insertion point in text_before (deleted in text_after)
30
+ # If it's a deletion, the position in before spans [i1, i2].
31
+ # If we're mapping an 'end' coordinate, we want to encompass the deleted text (i2).
32
+ # If we're mapping a 'start' coordinate, we want the start of the deletion (i1).
33
+ mapped_positions.append(i2 if is_end else i1)
34
+ else:
35
+ ratio = (pos_in_after - j1) / (j2 - j1)
36
+ mapped_positions.append(round(i1 + ratio * (i2 - i1)))
37
+
38
+ # If is_end is True, we want to maximize the mapped offset (include as much as possible)
39
+ # If is_end is False, we want to minimize the mapped offset
40
+ return max(mapped_positions) if is_end else min(mapped_positions)
41
+
42
+ original_text = "القصه طويل ومملل" # len 16
43
+ spelling_text = "القصة طويل وممل" # len 15
44
+
45
+ mapper = OffsetMapper(original_text, spelling_text)
46
+
47
+ start_orig = mapper.reverse_map_offset(6, is_end=False)
48
+ end_orig = mapper.reverse_map_offset(15, is_end=True)
49
+
50
+ print(f"Grammar patch [6:15] maps to [{start_orig}:{end_orig}]")
51
+ print(f"Original text at mapped coords: '{original_text[start_orig:end_orig]}'")
test_mlm.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from src.nlp.spelling.contextual_corrector import ContextualCorrector
2
+ import logging
3
+ logging.basicConfig(level=logging.INFO)
4
+
5
+ c = ContextualCorrector()
6
+ print("Contextual Corrector loaded successfully!")
test_pc001.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+ import os
3
+ sys.path.append(os.path.abspath('src'))
4
+ from app import analyze_text
5
+ import asyncio
6
+ import json
7
+
8
+ async def run_test():
9
+ text = "القصه طويل ومملل"
10
+ res = await analyze_text(text)
11
+ print(json.dumps(res, ensure_ascii=False, indent=2))
12
+
13
+ if __name__ == "__main__":
14
+ asyncio.run(run_test())
test_pc002.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from src.app import analyze_text
2
+ import json
3
+
4
+ original = "الولاد يلعبون بالشاروع"
5
+ result = analyze_text(original)
6
+ print(json.dumps(result, ensure_ascii=False, indent=2))
test_pc002_api.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+
4
+ resp = requests.post("http://127.0.0.1:8000/api/v1/analyze", json={"text": "الولاد يلعبون بالشاروع"})
5
+ print(json.dumps(resp.json(), ensure_ascii=False))
test_pc023.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ from src.app import analyze_text
3
+ from flask import Flask, request
4
+ import json
5
+
6
+ app = Flask(__name__)
7
+
8
+ async def run_test():
9
+ with app.test_request_context(json={'text': 'القصه طويل ومملل'}):
10
+ res = analyze_text()
11
+ print(res.get_data(as_text=True))
12
+
13
+ if __name__ == "__main__":
14
+ from src.app import load_models
15
+ print("Loading models...")
16
+ load_models()
17
+ asyncio.run(run_test())
test_pc027.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import json
2
+ from src.app import analyze_text
3
+
4
+ res = analyze_text("الكتاب مفيد جدا وانا احبه")
5
+ print(json.dumps(res, ensure_ascii=False, indent=2))
test_pc034.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from src.nlp.grammar.grammar_rules import ArabicGrammarGuard
2
+ guard = ArabicGrammarGuard()
3
+ text = "الحكومة أعلنت قرارا جديدا والمواطنون سعداء"
4
+ res = guard.fix_tanween_fathah(text)
5
+ print("Result:", res)
test_pc044.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import logging
2
+ from src.nlp.spelling.araspell_rules import AraSpellPostProcessor
3
+
4
+ # Mock original and result
5
+ original = "المهندسات صممو المشرووع الكبير"
6
+ result = "المهندسات مصممو المشروع الكبير"
7
+
8
+ orig_words = original.split()
9
+ res_words_list = result.split()
10
+
11
+ print(f"Original: {orig_words}")
12
+ print(f"Result: {res_words_list}")
13
+
14
+ if len(orig_words) == len(res_words_list):
15
+ for idx in range(len(orig_words)):
16
+ ow = orig_words[idx]
17
+ rw = res_words_list[idx]
18
+ if not ow.startswith('م') and rw.startswith('م') and rw[1:] == ow and ow.endswith('و'):
19
+ print(f"[SPELLING] Blocked morphological mutation (verb→noun '{ow}'→'{rw}'): '{original}' -> '{result}'")
20
+ result = original
21
+ break
22
+
23
+ print(f"Final result: {result}")
test_punc.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from src.nlp.punctuation.punctuation_service import get_punctuation_model
2
+ from src.nlp.punctuation.punctuation_rules import validate_punctuation_diff
3
+ import logging
4
+ logging.basicConfig(level=logging.INFO)
5
+
6
+ def test():
7
+ checker = get_punctuation_model()
8
+ texts = [
9
+ "قال المعلم يقدر المجتمع جهود المهندسين برغم الصعوبات التي واجهوها حققوا نجاحا كبيرا في المشروع و ابهروا العالم",
10
+ "هل ذهبت الى المدرسة اليوم يا احمد",
11
+ "الجو جميل جدا في الاسكندرية الان",
12
+ "من اهم اهداف الشركة زيادة المبيعات تحسين الجودة و ارضاء العملاء"
13
+ ]
14
+ for t in texts:
15
+ result = checker.correct(t)
16
+ print(f"Original: {t}")
17
+ print(f"Punc: {result}\n")
18
+
19
+ if __name__ == '__main__':
20
+ test()
test_punc_rules.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ from src.nlp.punctuation.punctuation_service import get_punctuation_model
3
+
4
+ def run_tests():
5
+ checker = get_punctuation_model()
6
+
7
+ cases = {
8
+ "1. نقطتين بعد القول": "قال المعلم العلم نور",
9
+ "2. نقطتين للتفصيل": "فصول السنة أربعة الصيف الخريف الشتاء والربيع",
10
+ "3. نقطتين للأمثلة": "أدوات الاستفهام كثيرة مثل أين متى وكيف",
11
+ "4. نقطتين للتفسير": "الأسد حيوان مفترس",
12
+ "5. فاصلة بين الجمل": "ذهبت الى السوق واشتريت الفواكه ثم عدت الى المنزل",
13
+ "6. فاصلة للتعداد": "اشتريت تفاحا وبرتقالا وموزا",
14
+ "7. فاصلة للنداء": "يا علي أقبل",
15
+ "8. فاصلة للشرط": "إذا ذاكرت بجد و اجتهدت في دروسك سوف تنجح",
16
+ "9. فصلة منقوطة للسبب": "أجتهد في دروسي لأنها الطريق إلى نجاحي",
17
+ "10. فصلة منقوطة للنتيجة": "كان الطالب مجتهدا فنجح بتفوق",
18
+ "11. نقطة للنهاية": "الدين النصيحة"
19
+ }
20
+
21
+ print("=== Testing Punctuation Rules ===")
22
+ for desc, text in cases.items():
23
+ result = checker.correct(text)
24
+ print(f"\n[{desc}]")
25
+ print(f"Input : {text}")
26
+ print(f"Output: {result}")
27
+
28
+ if __name__ == '__main__':
29
+ run_tests()
test_raw_punc.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ from src.nlp.punctuation.punctuation_service import get_punctuation_model
3
+
4
+ def test():
5
+ checker = get_punctuation_model()
6
+ text = "قال المعلم العلم نور"
7
+
8
+ # Process text chunk using the model's raw predict
9
+ raw = checker._predict_chunk(text)
10
+ print(f"RAW PREDICT: {raw}")
11
+
12
+ # Process through the whole pipeline
13
+ final = checker.correct(text)
14
+ print(f"FINAL: {final}")
15
+
16
+ test()
tests/phase10/reports/collision_benchmark_results.json CHANGED
The diff for this file is too large to render. See raw diff
 
tests/phase10/reports/collision_report.json ADDED
@@ -0,0 +1,2233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "timestamp": "2026-06-27T13:50:09Z",
3
+ "target": "https://bayan10-bayan-api.hf.space/api/analyze",
4
+ "total": 50,
5
+ "passed": 6,
6
+ "failed": 38,
7
+ "errors": 6,
8
+ "pass_rate": 12.0,
9
+ "root_cause_by_component": {
10
+ "PIPELINE": 17,
11
+ "STAGELOCKER": 4,
12
+ "MODEL": 1,
13
+ "UNKNOWN": 16
14
+ },
15
+ "failures_by_category": {
16
+ "spelling_grammar_overlap": 5,
17
+ "grammar_drops_spelling": 4,
18
+ "spelling_blocks_grammar": 5,
19
+ "multi_stage_collision": 8,
20
+ "punctuation_near_spelling": 5,
21
+ "three_stage_collision": 5,
22
+ "adjacent_corrections": 6
23
+ },
24
+ "results": [
25
+ {
26
+ "id": "PC001",
27
+ "category": "spelling_grammar_overlap",
28
+ "input": "المهندسون صممتو المشرووع",
29
+ "expected": "المهندسون صمموا المشروع",
30
+ "actual": "المهندسون صممت و المشروع",
31
+ "suggestions": [
32
+ {
33
+ "alternatives": [
34
+ "و المشروع",
35
+ "المشرووع"
36
+ ],
37
+ "confidence": 0.85,
38
+ "correction": "و المشروع",
39
+ "end": 24,
40
+ "id": "91de0837-a564-4451-b9cd-91ac4e5dc682",
41
+ "locked": true,
42
+ "original": "المشرووع",
43
+ "priority": 2,
44
+ "start": 16,
45
+ "type": "spelling"
46
+ },
47
+ {
48
+ "alternatives": [
49
+ "صممت",
50
+ "صممتو"
51
+ ],
52
+ "confidence": 0.7,
53
+ "correction": "صممت",
54
+ "end": 15,
55
+ "id": "74bd6f52-caa8-4ee4-a955-78b9b1ddcf67",
56
+ "locked": true,
57
+ "original": "صممتو",
58
+ "priority": 2,
59
+ "start": 10,
60
+ "type": "spelling"
61
+ }
62
+ ],
63
+ "elapsed_ms": 6488,
64
+ "verdict": "FAIL",
65
+ "root_cause_component": "PIPELINE",
66
+ "root_cause_detail": "Spelling and grammar overlap conflict",
67
+ "missing_words": [
68
+ "صمموا"
69
+ ]
70
+ },
71
+ {
72
+ "id": "PC002",
73
+ "category": "spelling_grammar_overlap",
74
+ "input": "الولاد يلعبون بالشاروع",
75
+ "expected": "الأولاد يلعبون بالشارع",
76
+ "actual": "الأولاد يلعبون بالشارع.",
77
+ "suggestions": [
78
+ {
79
+ "alternatives": [
80
+ "الأولاد",
81
+ "الولاد"
82
+ ],
83
+ "confidence": 0.7,
84
+ "correction": "الأولاد",
85
+ "end": 6,
86
+ "id": "a4032030-39f8-4973-bd8e-538ef162d154",
87
+ "locked": true,
88
+ "original": "الولاد",
89
+ "priority": 2,
90
+ "start": 0,
91
+ "type": "spelling"
92
+ },
93
+ {
94
+ "alternatives": [
95
+ "بالشارع",
96
+ "بالشاروع"
97
+ ],
98
+ "confidence": 0.7,
99
+ "correction": "بالشارع.",
100
+ "end": 22,
101
+ "id": "9f52b0f3-7be6-40c0-a606-93ea1220c9d5",
102
+ "locked": true,
103
+ "original": "بالشاروع",
104
+ "priority": 2,
105
+ "start": 14,
106
+ "type": "spelling"
107
+ }
108
+ ],
109
+ "elapsed_ms": 4935,
110
+ "verdict": "FAIL",
111
+ "root_cause_component": "PIPELINE",
112
+ "root_cause_detail": "Spelling and grammar overlap conflict",
113
+ "missing_words": [
114
+ "بالشارع"
115
+ ]
116
+ },
117
+ {
118
+ "id": "PC003",
119
+ "category": "spelling_grammar_overlap",
120
+ "input": "البنات يذهبون الي المدرسه",
121
+ "expected": "البنات يذهبن إلى المدرسة",
122
+ "actual": "البنات يذهبن إلى المدرسة.",
123
+ "suggestions": [
124
+ {
125
+ "alternatives": [],
126
+ "confidence": 1.0,
127
+ "correction": "يذهبن",
128
+ "end": 13,
129
+ "id": "9c098ffd-7939-4aff-93ad-99fd7131140d",
130
+ "locked": true,
131
+ "original": "يذهبون",
132
+ "priority": 3,
133
+ "start": 7,
134
+ "type": "grammar"
135
+ },
136
+ {
137
+ "alternatives": [
138
+ "إلى",
139
+ "الي"
140
+ ],
141
+ "confidence": 0.9,
142
+ "correction": "إلى",
143
+ "end": 17,
144
+ "id": "0f8c624b-74da-4cdc-b9d2-aafe804d3e9a",
145
+ "locked": true,
146
+ "original": "الي",
147
+ "priority": 2,
148
+ "start": 14,
149
+ "type": "spelling"
150
+ },
151
+ {
152
+ "alternatives": [
153
+ "المدرسة",
154
+ "المدرسه"
155
+ ],
156
+ "confidence": 0.9,
157
+ "correction": "المدرسة.",
158
+ "end": 25,
159
+ "id": "40caecb4-8fcb-444d-b101-fcbad3bdd340",
160
+ "locked": true,
161
+ "original": "المدرسه",
162
+ "priority": 2,
163
+ "start": 18,
164
+ "type": "spelling"
165
+ }
166
+ ],
167
+ "elapsed_ms": 5431,
168
+ "verdict": "FAIL",
169
+ "root_cause_component": "PIPELINE",
170
+ "root_cause_detail": "Spelling and grammar overlap conflict",
171
+ "missing_words": [
172
+ "المدرسة"
173
+ ]
174
+ },
175
+ {
176
+ "id": "PC004",
177
+ "category": "spelling_grammar_overlap",
178
+ "input": "الرجال يعملون في المصنعو",
179
+ "expected": "الرجال يعملون في المصنع",
180
+ "actual": "الرجال يعملون في المصنع.",
181
+ "suggestions": [
182
+ {
183
+ "alternatives": [],
184
+ "confidence": 0.75,
185
+ "correction": "المصنع.",
186
+ "end": 24,
187
+ "id": "900682e8-3725-4ecd-abba-6ee35e8ae587",
188
+ "locked": true,
189
+ "original": "المصنعو",
190
+ "priority": 2,
191
+ "start": 17,
192
+ "type": "spelling"
193
+ }
194
+ ],
195
+ "elapsed_ms": 7117,
196
+ "verdict": "FAIL",
197
+ "root_cause_component": "PIPELINE",
198
+ "root_cause_detail": "Spelling and grammar overlap conflict",
199
+ "missing_words": [
200
+ "المصنع"
201
+ ]
202
+ },
203
+ {
204
+ "id": "PC005",
205
+ "category": "spelling_grammar_overlap",
206
+ "input": "النساء ذهب الي السوق",
207
+ "expected": "النساء ذهبن إلى السوق",
208
+ "actual": "النساء ذهبن إلى السوق.",
209
+ "suggestions": [
210
+ {
211
+ "alternatives": [],
212
+ "confidence": 1.0,
213
+ "correction": "ذهبن",
214
+ "end": 10,
215
+ "id": "f3d86b4a-048e-48bf-beec-10ba2064d51b",
216
+ "locked": true,
217
+ "original": "ذهب",
218
+ "priority": 3,
219
+ "start": 7,
220
+ "type": "grammar"
221
+ },
222
+ {
223
+ "alternatives": [
224
+ "إلى",
225
+ "الي"
226
+ ],
227
+ "confidence": 0.9,
228
+ "correction": "إلى",
229
+ "end": 14,
230
+ "id": "adef6410-9743-46a7-aa9f-6d7dfd781eab",
231
+ "locked": true,
232
+ "original": "الي",
233
+ "priority": 2,
234
+ "start": 11,
235
+ "type": "spelling"
236
+ },
237
+ {
238
+ "alternatives": [],
239
+ "confidence": 0.7,
240
+ "correction": "السوق.",
241
+ "end": 20,
242
+ "id": "db698fa7-be82-408e-bc0d-3405aeb86d60",
243
+ "locked": true,
244
+ "original": "السوق",
245
+ "priority": 1,
246
+ "start": 15,
247
+ "type": "punctuation"
248
+ }
249
+ ],
250
+ "elapsed_ms": 5569,
251
+ "verdict": "FAIL",
252
+ "root_cause_component": "PIPELINE",
253
+ "root_cause_detail": "Spelling and grammar overlap conflict",
254
+ "missing_words": [
255
+ "السوق"
256
+ ]
257
+ },
258
+ {
259
+ "id": "PC006",
260
+ "category": "grammar_drops_spelling",
261
+ "input": "رأيت اخوك في المسجيد",
262
+ "expected": "رأيت أخاك في المسجد",
263
+ "actual": "رأيت أخاك في المسجد.",
264
+ "suggestions": [
265
+ {
266
+ "alternatives": [],
267
+ "confidence": 1.0,
268
+ "correction": "أخاك",
269
+ "end": 9,
270
+ "id": "9ca0d2a6-893c-43cf-b0b4-1fb7020302b4",
271
+ "locked": true,
272
+ "original": "اخوك",
273
+ "priority": 3,
274
+ "start": 5,
275
+ "type": "grammar"
276
+ },
277
+ {
278
+ "alternatives": [
279
+ "المسجد",
280
+ "المسجيد"
281
+ ],
282
+ "confidence": 0.7,
283
+ "correction": "المسجد.",
284
+ "end": 20,
285
+ "id": "bc2f6491-05d8-462f-84be-e5e156e09720",
286
+ "locked": true,
287
+ "original": "المسجيد",
288
+ "priority": 2,
289
+ "start": 13,
290
+ "type": "spelling"
291
+ }
292
+ ],
293
+ "elapsed_ms": 5770,
294
+ "verdict": "FAIL",
295
+ "root_cause_component": "PIPELINE",
296
+ "root_cause_detail": "Grammar stage dropped spelling fix",
297
+ "missing_words": [
298
+ "المسجد"
299
+ ]
300
+ },
301
+ {
302
+ "id": "PC007",
303
+ "category": "grammar_drops_spelling",
304
+ "input": "ان ابوك رجل طييب",
305
+ "expected": "إن أباك رجل طيب",
306
+ "actual": "إن أباك رجل طيب.",
307
+ "suggestions": [
308
+ {
309
+ "alternatives": [],
310
+ "confidence": 1.0,
311
+ "correction": "إن أباك",
312
+ "end": 7,
313
+ "id": "0a65d16f-0216-4f55-94d6-f0b9e2aca0d8",
314
+ "locked": true,
315
+ "original": "ان ابوك",
316
+ "priority": 3,
317
+ "start": 0,
318
+ "type": "grammar"
319
+ },
320
+ {
321
+ "alternatives": [
322
+ "طيب",
323
+ "طييب"
324
+ ],
325
+ "confidence": 0.7,
326
+ "correction": "طيب.",
327
+ "end": 16,
328
+ "id": "0d7b0679-0bd8-4c1f-a4e5-3c5db334dc74",
329
+ "locked": true,
330
+ "original": "طييب",
331
+ "priority": 2,
332
+ "start": 12,
333
+ "type": "spelling"
334
+ }
335
+ ],
336
+ "elapsed_ms": 5805,
337
+ "verdict": "FAIL",
338
+ "root_cause_component": "PIPELINE",
339
+ "root_cause_detail": "Grammar stage dropped spelling fix",
340
+ "missing_words": [
341
+ "طيب"
342
+ ]
343
+ },
344
+ {
345
+ "id": "PC008",
346
+ "category": "grammar_drops_spelling",
347
+ "input": "في المهندسون الماهروون",
348
+ "expected": "في المهندسين الماهرين",
349
+ "actual": "في المهندسين الماهرين",
350
+ "suggestions": [
351
+ {
352
+ "alternatives": [],
353
+ "confidence": 1.0,
354
+ "correction": "المهندسين الماهرين",
355
+ "end": 22,
356
+ "id": "474621c7-9536-4609-967a-d62c09bd850c",
357
+ "locked": true,
358
+ "original": "المهندسون الماهروون",
359
+ "priority": 3,
360
+ "start": 3,
361
+ "type": "grammar"
362
+ }
363
+ ],
364
+ "elapsed_ms": 4630,
365
+ "verdict": "PASS"
366
+ },
367
+ {
368
+ "id": "PC009",
369
+ "category": "grammar_drops_spelling",
370
+ "input": "هذان الطالبتان مجتهدتاان",
371
+ "expected": "هاتان الطالبتان مجتهدتان",
372
+ "actual": "هاتان الطالبتان مجتهدتان.",
373
+ "suggestions": [
374
+ {
375
+ "alternatives": [],
376
+ "confidence": 1.0,
377
+ "correction": "هاتان",
378
+ "end": 4,
379
+ "id": "496c587b-b661-4403-94e7-7292b023d0a1",
380
+ "locked": true,
381
+ "original": "هذان",
382
+ "priority": 3,
383
+ "start": 0,
384
+ "type": "grammar"
385
+ },
386
+ {
387
+ "alternatives": [],
388
+ "confidence": 1.0,
389
+ "correction": "مجتهدتان.",
390
+ "end": 24,
391
+ "id": "d94ac434-8613-43da-b0b4-017d7458f5ee",
392
+ "locked": true,
393
+ "original": "مجتهدتاان",
394
+ "priority": 3,
395
+ "start": 15,
396
+ "type": "grammar"
397
+ }
398
+ ],
399
+ "elapsed_ms": 6632,
400
+ "verdict": "FAIL",
401
+ "root_cause_component": "PIPELINE",
402
+ "root_cause_detail": "Grammar stage dropped spelling fix",
403
+ "missing_words": [
404
+ "مجتهدتان"
405
+ ]
406
+ },
407
+ {
408
+ "id": "PC010",
409
+ "category": "grammar_drops_spelling",
410
+ "input": "كي يتعلمون الدرسو",
411
+ "expected": "كي يتعلموا الدرس",
412
+ "actual": "كي يتعلم الدرس.",
413
+ "suggestions": [
414
+ {
415
+ "alternatives": [],
416
+ "confidence": 1.0,
417
+ "correction": "يتعلم",
418
+ "end": 10,
419
+ "id": "4325622c-f85a-4974-8671-978ad062de0b",
420
+ "locked": true,
421
+ "original": "يتعلمون",
422
+ "priority": 3,
423
+ "start": 3,
424
+ "type": "grammar"
425
+ },
426
+ {
427
+ "alternatives": [],
428
+ "confidence": 0.75,
429
+ "correction": "الدرس.",
430
+ "end": 17,
431
+ "id": "1470f3a4-3a52-44fa-886a-79095732cfa1",
432
+ "locked": true,
433
+ "original": "الدرسو",
434
+ "priority": 2,
435
+ "start": 11,
436
+ "type": "spelling"
437
+ }
438
+ ],
439
+ "elapsed_ms": 4587,
440
+ "verdict": "FAIL",
441
+ "root_cause_component": "PIPELINE",
442
+ "root_cause_detail": "Grammar stage dropped spelling fix",
443
+ "missing_words": [
444
+ "يتعلموا",
445
+ "الدرس"
446
+ ]
447
+ },
448
+ {
449
+ "id": "PC011",
450
+ "category": "spelling_blocks_grammar",
451
+ "input": "السياره جميل جدا",
452
+ "expected": "السيارة جميلة جداً",
453
+ "actual": "السيارة جميلة جداً",
454
+ "suggestions": [
455
+ {
456
+ "alternatives": [],
457
+ "confidence": 1.0,
458
+ "correction": "جميلة جداً",
459
+ "end": 16,
460
+ "id": "bd2be1ee-c0c0-4567-9d20-f1c82d6728b3",
461
+ "locked": true,
462
+ "original": "جميل جدا",
463
+ "priority": 3,
464
+ "start": 8,
465
+ "type": "grammar"
466
+ },
467
+ {
468
+ "alternatives": [
469
+ "السيارة",
470
+ "السياره"
471
+ ],
472
+ "confidence": 0.9,
473
+ "correction": "السيارة",
474
+ "end": 7,
475
+ "id": "10c5fe4e-d1e6-4598-bca9-e028cd7cb2fb",
476
+ "locked": true,
477
+ "original": "السياره",
478
+ "priority": 2,
479
+ "start": 0,
480
+ "type": "spelling"
481
+ }
482
+ ],
483
+ "elapsed_ms": 4472,
484
+ "verdict": "PASS"
485
+ },
486
+ {
487
+ "id": "PC012",
488
+ "category": "spelling_blocks_grammar",
489
+ "input": "المدينه كبير وواسع",
490
+ "expected": "المدينة كبيرة وواسعة",
491
+ "actual": "المدينة كبيرة وواسعة",
492
+ "suggestions": [
493
+ {
494
+ "alternatives": [],
495
+ "confidence": 1.0,
496
+ "correction": "كبيرة وواسعة",
497
+ "end": 18,
498
+ "id": "ab6b6f94-24fd-4e05-849d-0c25c7b6ae7f",
499
+ "locked": true,
500
+ "original": "كبير وواسع",
501
+ "priority": 3,
502
+ "start": 8,
503
+ "type": "grammar"
504
+ },
505
+ {
506
+ "alternatives": [
507
+ "المدينة",
508
+ "المدينه"
509
+ ],
510
+ "confidence": 0.9,
511
+ "correction": "المدينة",
512
+ "end": 7,
513
+ "id": "25bae43b-8265-4f7e-95fd-a34cd3af1f4f",
514
+ "locked": true,
515
+ "original": "المدينه",
516
+ "priority": 2,
517
+ "start": 0,
518
+ "type": "spelling"
519
+ }
520
+ ],
521
+ "elapsed_ms": 4563,
522
+ "verdict": "PASS"
523
+ },
524
+ {
525
+ "id": "PC013",
526
+ "category": "spelling_blocks_grammar",
527
+ "input": "الطالبه متفوق في دراسته",
528
+ "expected": "الطالبة متفوقة في دراستها",
529
+ "actual": "الطالبة متفوقة في دراستها.",
530
+ "suggestions": [
531
+ {
532
+ "alternatives": [],
533
+ "confidence": 1.0,
534
+ "correction": "متفوقة",
535
+ "end": 13,
536
+ "id": "a8da9953-88f5-495f-b32f-d01dacee2211",
537
+ "locked": true,
538
+ "original": "متفوق",
539
+ "priority": 3,
540
+ "start": 8,
541
+ "type": "grammar"
542
+ },
543
+ {
544
+ "alternatives": [],
545
+ "confidence": 1.0,
546
+ "correction": "دراستها.",
547
+ "end": 23,
548
+ "id": "27b27dc4-8536-4663-8fe9-6a099bf429e1",
549
+ "locked": true,
550
+ "original": "دراسته",
551
+ "priority": 3,
552
+ "start": 17,
553
+ "type": "grammar"
554
+ },
555
+ {
556
+ "alternatives": [
557
+ "الطالبة",
558
+ "الطالبه"
559
+ ],
560
+ "confidence": 0.9,
561
+ "correction": "الطالبة",
562
+ "end": 7,
563
+ "id": "2e86f777-25ae-48a5-a467-158441da6249",
564
+ "locked": true,
565
+ "original": "الطالبه",
566
+ "priority": 2,
567
+ "start": 0,
568
+ "type": "spelling"
569
+ }
570
+ ],
571
+ "elapsed_ms": 4769,
572
+ "verdict": "FAIL",
573
+ "root_cause_component": "STAGELOCKER",
574
+ "root_cause_detail": "spelling→grammar lock collision",
575
+ "missing_words": [
576
+ "دراستها"
577
+ ]
578
+ },
579
+ {
580
+ "id": "PC014",
581
+ "category": "spelling_blocks_grammar",
582
+ "input": "الشمس مشرق اليووم",
583
+ "expected": "الشمس مشرقة اليوم",
584
+ "actual": "الشمس: مشرقة اليوم.",
585
+ "suggestions": [
586
+ {
587
+ "alternatives": [],
588
+ "confidence": 1.0,
589
+ "correction": "مشرقة",
590
+ "end": 10,
591
+ "id": "ccd95c7e-2bb8-4c06-8acf-c64a7378c904",
592
+ "locked": true,
593
+ "original": "مشرق",
594
+ "priority": 3,
595
+ "start": 6,
596
+ "type": "grammar"
597
+ },
598
+ {
599
+ "alternatives": [
600
+ "اليوم",
601
+ "اليووم"
602
+ ],
603
+ "confidence": 0.7,
604
+ "correction": "اليوم.",
605
+ "end": 17,
606
+ "id": "37f1a239-5a4e-40a7-8941-a6bf04b0d93e",
607
+ "locked": true,
608
+ "original": "اليووم",
609
+ "priority": 2,
610
+ "start": 11,
611
+ "type": "spelling"
612
+ },
613
+ {
614
+ "alternatives": [],
615
+ "confidence": 0.8,
616
+ "correction": "الشمس:",
617
+ "end": 5,
618
+ "id": "2bad42a6-b21f-4f1d-87ea-1ab3b785e279",
619
+ "locked": true,
620
+ "original": "الشمس",
621
+ "priority": 1,
622
+ "start": 0,
623
+ "type": "punctuation"
624
+ }
625
+ ],
626
+ "elapsed_ms": 4591,
627
+ "verdict": "FAIL",
628
+ "root_cause_component": "STAGELOCKER",
629
+ "root_cause_detail": "spelling→grammar lock collision",
630
+ "missing_words": [
631
+ "اليوم"
632
+ ]
633
+ },
634
+ {
635
+ "id": "PC015",
636
+ "category": "spelling_blocks_grammar",
637
+ "input": "البنت ذكي في المدرسه",
638
+ "expected": "البنت ذكية في المدرسة",
639
+ "actual": "البنت ذكية في المدرسة.",
640
+ "suggestions": [
641
+ {
642
+ "alternatives": [],
643
+ "confidence": 1.0,
644
+ "correction": "ذكية",
645
+ "end": 9,
646
+ "id": "a45a4d6d-e8bc-4090-ad83-0f9b73c2c16f",
647
+ "locked": true,
648
+ "original": "ذكي",
649
+ "priority": 3,
650
+ "start": 6,
651
+ "type": "grammar"
652
+ },
653
+ {
654
+ "alternatives": [
655
+ "المدرسة",
656
+ "المدرسه"
657
+ ],
658
+ "confidence": 0.9,
659
+ "correction": "المدرسة.",
660
+ "end": 20,
661
+ "id": "8e55c1f0-2eb5-46cb-81bf-adca60cf01f7",
662
+ "locked": true,
663
+ "original": "المدرسه",
664
+ "priority": 2,
665
+ "start": 13,
666
+ "type": "spelling"
667
+ }
668
+ ],
669
+ "elapsed_ms": 5318,
670
+ "verdict": "FAIL",
671
+ "root_cause_component": "STAGELOCKER",
672
+ "root_cause_detail": "spelling→grammar lock collision",
673
+ "missing_words": [
674
+ "المدرسة"
675
+ ]
676
+ },
677
+ {
678
+ "id": "PC016",
679
+ "category": "multi_stage_collision",
680
+ "input": "انا ذهبت الي المدرسه والمهندسون حضر الاجتماع",
681
+ "expected": "أنا ذهبت إلى المدرسة والمهندسون حضروا الاجتماع",
682
+ "actual": "أنا ذهبت إلى المدرسة والمهندسين حضروا ال��جتماع.",
683
+ "suggestions": [
684
+ {
685
+ "alternatives": [],
686
+ "confidence": 1.0,
687
+ "correction": "والمهندسين حضروا",
688
+ "end": 35,
689
+ "id": "114728a6-bfbd-4ede-8262-9d7c86e74c11",
690
+ "locked": true,
691
+ "original": "والمهندسون حضر",
692
+ "priority": 3,
693
+ "start": 21,
694
+ "type": "grammar"
695
+ },
696
+ {
697
+ "alternatives": [
698
+ "أنا",
699
+ "انا"
700
+ ],
701
+ "confidence": 0.9,
702
+ "correction": "أنا",
703
+ "end": 3,
704
+ "id": "c2cb5620-564f-468e-814a-c1d560321d8f",
705
+ "locked": true,
706
+ "original": "انا",
707
+ "priority": 2,
708
+ "start": 0,
709
+ "type": "spelling"
710
+ },
711
+ {
712
+ "alternatives": [
713
+ "إلى",
714
+ "الي"
715
+ ],
716
+ "confidence": 0.9,
717
+ "correction": "إلى",
718
+ "end": 12,
719
+ "id": "42631bb9-9b30-48de-881d-c971686ea21f",
720
+ "locked": true,
721
+ "original": "الي",
722
+ "priority": 2,
723
+ "start": 9,
724
+ "type": "spelling"
725
+ },
726
+ {
727
+ "alternatives": [
728
+ "المدرسة",
729
+ "المدرسه"
730
+ ],
731
+ "confidence": 0.9,
732
+ "correction": "المدرسة",
733
+ "end": 20,
734
+ "id": "0d5cf45f-6b7a-4614-acc1-20153028bb7b",
735
+ "locked": true,
736
+ "original": "المدرسه",
737
+ "priority": 2,
738
+ "start": 13,
739
+ "type": "spelling"
740
+ },
741
+ {
742
+ "alternatives": [],
743
+ "confidence": 0.8,
744
+ "correction": "الاجتماع.",
745
+ "end": 44,
746
+ "id": "e78b8d66-96ec-47c2-b57a-77434fd39c5e",
747
+ "locked": true,
748
+ "original": "الاجتماع",
749
+ "priority": 1,
750
+ "start": 36,
751
+ "type": "punctuation"
752
+ }
753
+ ],
754
+ "elapsed_ms": 6002,
755
+ "verdict": "FAIL",
756
+ "root_cause_component": "PIPELINE",
757
+ "root_cause_detail": "Multi-stage interaction failure",
758
+ "missing_words": [
759
+ "الاجتماع",
760
+ "والمهندسون"
761
+ ]
762
+ },
763
+ {
764
+ "id": "PC017",
765
+ "category": "multi_stage_collision",
766
+ "input": "الاطفال يلعب في الحديقه",
767
+ "expected": "الأطفال يلعبون في الحديقة",
768
+ "actual": "الأطفال يلعبون في الحديقة.",
769
+ "suggestions": [
770
+ {
771
+ "alternatives": [],
772
+ "confidence": 1.0,
773
+ "correction": "يلعبون",
774
+ "end": 12,
775
+ "id": "0ab7992d-7737-4c16-8cb9-b8b1ac429928",
776
+ "locked": true,
777
+ "original": "يلعب",
778
+ "priority": 3,
779
+ "start": 8,
780
+ "type": "grammar"
781
+ },
782
+ {
783
+ "alternatives": [
784
+ "الأطفال",
785
+ "الاطفال"
786
+ ],
787
+ "confidence": 0.9,
788
+ "correction": "الأطفال",
789
+ "end": 7,
790
+ "id": "55d7d1a6-cb42-4620-9071-a90893488ce8",
791
+ "locked": true,
792
+ "original": "الاطفال",
793
+ "priority": 2,
794
+ "start": 0,
795
+ "type": "spelling"
796
+ },
797
+ {
798
+ "alternatives": [
799
+ "الحديقة",
800
+ "الحديقه"
801
+ ],
802
+ "confidence": 0.9,
803
+ "correction": "الحديقة.",
804
+ "end": 23,
805
+ "id": "70b238bf-b0b0-4bc9-9438-b8cd998f4a37",
806
+ "locked": true,
807
+ "original": "الحديقه",
808
+ "priority": 2,
809
+ "start": 16,
810
+ "type": "spelling"
811
+ }
812
+ ],
813
+ "elapsed_ms": 5205,
814
+ "verdict": "FAIL",
815
+ "root_cause_component": "PIPELINE",
816
+ "root_cause_detail": "Multi-stage interaction failure",
817
+ "missing_words": [
818
+ "الحديقة"
819
+ ]
820
+ },
821
+ {
822
+ "id": "PC018",
823
+ "category": "multi_stage_collision",
824
+ "input": "الطالبات كتب الواجب في الغرفه",
825
+ "expected": "الطالبات كتبن الواجب في الغرفة",
826
+ "actual": "الطالبات كتبن الواجب في الغرفة.",
827
+ "suggestions": [
828
+ {
829
+ "alternatives": [],
830
+ "confidence": 1.0,
831
+ "correction": "كتبن",
832
+ "end": 12,
833
+ "id": "6348b075-b858-4a8a-96af-093e6c90765a",
834
+ "locked": true,
835
+ "original": "كتب",
836
+ "priority": 3,
837
+ "start": 9,
838
+ "type": "grammar"
839
+ },
840
+ {
841
+ "alternatives": [
842
+ "الغرفة",
843
+ "الغرفه"
844
+ ],
845
+ "confidence": 0.9,
846
+ "correction": "الغرفة.",
847
+ "end": 29,
848
+ "id": "457b7d3b-5e6b-4fe2-9652-35fbad890d10",
849
+ "locked": true,
850
+ "original": "الغرفه",
851
+ "priority": 2,
852
+ "start": 23,
853
+ "type": "spelling"
854
+ }
855
+ ],
856
+ "elapsed_ms": 5446,
857
+ "verdict": "FAIL",
858
+ "root_cause_component": "PIPELINE",
859
+ "root_cause_detail": "Multi-stage interaction failure",
860
+ "missing_words": [
861
+ "الغرفة"
862
+ ]
863
+ },
864
+ {
865
+ "id": "PC019",
866
+ "category": "multi_stage_collision",
867
+ "input": "المعلمات حضر الاجتماعو في الجامعه",
868
+ "expected": "المعلمات حضرن الاجتماع في الجامعة",
869
+ "actual": "المعلمات حضرن الاجتماع في الجامعة.",
870
+ "suggestions": [
871
+ {
872
+ "alternatives": [],
873
+ "confidence": 1.0,
874
+ "correction": "حضرن",
875
+ "end": 12,
876
+ "id": "4d67a791-5d1f-48dd-a28c-33c517eac13b",
877
+ "locked": true,
878
+ "original": "حضر",
879
+ "priority": 3,
880
+ "start": 9,
881
+ "type": "grammar"
882
+ },
883
+ {
884
+ "alternatives": [
885
+ "الجامعة",
886
+ "الجامعه"
887
+ ],
888
+ "confidence": 0.9,
889
+ "correction": "الجامعة.",
890
+ "end": 33,
891
+ "id": "852153f8-b941-4b27-b125-d76bd8eb9e74",
892
+ "locked": true,
893
+ "original": "الجامعه",
894
+ "priority": 2,
895
+ "start": 26,
896
+ "type": "spelling"
897
+ },
898
+ {
899
+ "alternatives": [
900
+ "الاجتماع",
901
+ "الاجتماعو"
902
+ ],
903
+ "confidence": 0.7,
904
+ "correction": "الاجتماع",
905
+ "end": 22,
906
+ "id": "b445e0f1-3b9e-4bab-907d-b79812609e26",
907
+ "locked": true,
908
+ "original": "الاجتماعو",
909
+ "priority": 2,
910
+ "start": 13,
911
+ "type": "spelling"
912
+ }
913
+ ],
914
+ "elapsed_ms": 6396,
915
+ "verdict": "FAIL",
916
+ "root_cause_component": "PIPELINE",
917
+ "root_cause_detail": "Multi-stage interaction failure",
918
+ "missing_words": [
919
+ "الجامعة"
920
+ ]
921
+ },
922
+ {
923
+ "id": "PC020",
924
+ "category": "multi_stage_collision",
925
+ "input": "العمال بنى المبني الجديد",
926
+ "expected": "العمال بنوا المبنى الجديد",
927
+ "actual": "العمال بنوا المبنى الجديد.",
928
+ "suggestions": [
929
+ {
930
+ "alternatives": [],
931
+ "confidence": 1.0,
932
+ "correction": "بنوا المبنى",
933
+ "end": 17,
934
+ "id": "7d7b33d9-f4e2-497c-a4cf-ebed5792375b",
935
+ "locked": true,
936
+ "original": "بنى المبني",
937
+ "priority": 3,
938
+ "start": 7,
939
+ "type": "grammar"
940
+ },
941
+ {
942
+ "alternatives": [],
943
+ "confidence": 0.8,
944
+ "correction": "الجديد.",
945
+ "end": 24,
946
+ "id": "ea0da3b3-dbb4-4462-bcc5-de01673fc2d1",
947
+ "locked": true,
948
+ "original": "الجديد",
949
+ "priority": 1,
950
+ "start": 18,
951
+ "type": "punctuation"
952
+ }
953
+ ],
954
+ "elapsed_ms": 6390,
955
+ "verdict": "FAIL",
956
+ "root_cause_component": "PIPELINE",
957
+ "root_cause_detail": "Multi-stage interaction failure",
958
+ "missing_words": [
959
+ "الجديد"
960
+ ]
961
+ },
962
+ {
963
+ "id": "PC021",
964
+ "category": "spelling_blocks_grammar",
965
+ "input": "الجامعه قريب من البيت",
966
+ "expected": "الجامعة قريبة من البيت",
967
+ "actual": "الجامعة قريبة من البيت.",
968
+ "suggestions": [
969
+ {
970
+ "alternatives": [],
971
+ "confidence": 1.0,
972
+ "correction": "قريبة",
973
+ "end": 12,
974
+ "id": "d443283e-5ff7-4801-b4fd-92b9a9027ff0",
975
+ "locked": true,
976
+ "original": "قريب",
977
+ "priority": 3,
978
+ "start": 8,
979
+ "type": "grammar"
980
+ },
981
+ {
982
+ "alternatives": [
983
+ "الجامعة",
984
+ "الجامعه"
985
+ ],
986
+ "confidence": 0.9,
987
+ "correction": "الجامعة",
988
+ "end": 7,
989
+ "id": "297bc8de-eba9-42a2-b8f8-d9daec85aa47",
990
+ "locked": true,
991
+ "original": "الجامعه",
992
+ "priority": 2,
993
+ "start": 0,
994
+ "type": "spelling"
995
+ },
996
+ {
997
+ "alternatives": [],
998
+ "confidence": 0.8,
999
+ "correction": "البيت.",
1000
+ "end": 21,
1001
+ "id": "d364d368-640e-449d-b614-97c80d0f7d88",
1002
+ "locked": true,
1003
+ "original": "البيت",
1004
+ "priority": 1,
1005
+ "start": 16,
1006
+ "type": "punctuation"
1007
+ }
1008
+ ],
1009
+ "elapsed_ms": 6667,
1010
+ "verdict": "FAIL",
1011
+ "root_cause_component": "MODEL",
1012
+ "root_cause_detail": "Grammar model missed correction",
1013
+ "missing_words": [
1014
+ "البيت"
1015
+ ]
1016
+ },
1017
+ {
1018
+ "id": "PC022",
1019
+ "category": "spelling_blocks_grammar",
1020
+ "input": "الطائره سريع جدا",
1021
+ "expected": "الطائرة سريعة جداً",
1022
+ "actual": "الطائرة سريعة جداً",
1023
+ "suggestions": [
1024
+ {
1025
+ "alternatives": [],
1026
+ "confidence": 1.0,
1027
+ "correction": "سريعة جداً",
1028
+ "end": 16,
1029
+ "id": "7273a75b-66b0-45ef-bb81-d1fde5dc7bcd",
1030
+ "locked": true,
1031
+ "original": "سريع جدا",
1032
+ "priority": 3,
1033
+ "start": 8,
1034
+ "type": "grammar"
1035
+ },
1036
+ {
1037
+ "alternatives": [
1038
+ "الطائرة",
1039
+ "الطائره"
1040
+ ],
1041
+ "confidence": 0.9,
1042
+ "correction": "الطائرة",
1043
+ "end": 7,
1044
+ "id": "41141ff8-c00d-4fd2-b6c2-bf171c850742",
1045
+ "locked": true,
1046
+ "original": "الطائره",
1047
+ "priority": 2,
1048
+ "start": 0,
1049
+ "type": "spelling"
1050
+ }
1051
+ ],
1052
+ "elapsed_ms": 5452,
1053
+ "verdict": "PASS"
1054
+ },
1055
+ {
1056
+ "id": "PC023",
1057
+ "category": "spelling_blocks_grammar",
1058
+ "input": "القصه طويل ومملل",
1059
+ "expected": "القصة طويلة ومملة",
1060
+ "actual": "القصة طويلة ومملةل",
1061
+ "suggestions": [
1062
+ {
1063
+ "alternatives": [],
1064
+ "confidence": 1.0,
1065
+ "correction": "طويلة ومملة",
1066
+ "end": 15,
1067
+ "id": "b2f7da1f-4973-4729-af2e-4fe873e1d9f0",
1068
+ "locked": true,
1069
+ "original": "طويل وممل",
1070
+ "priority": 3,
1071
+ "start": 6,
1072
+ "type": "grammar"
1073
+ },
1074
+ {
1075
+ "alternatives": [
1076
+ "القصة",
1077
+ "القصه"
1078
+ ],
1079
+ "confidence": 0.9,
1080
+ "correction": "القصة",
1081
+ "end": 5,
1082
+ "id": "fa94bb6e-42de-48f0-8eee-f4f214c20018",
1083
+ "locked": true,
1084
+ "original": "القصه",
1085
+ "priority": 2,
1086
+ "start": 0,
1087
+ "type": "spelling"
1088
+ }
1089
+ ],
1090
+ "elapsed_ms": 8149,
1091
+ "verdict": "FAIL",
1092
+ "root_cause_component": "STAGELOCKER",
1093
+ "root_cause_detail": "spelling→grammar lock collision",
1094
+ "missing_words": [
1095
+ "ومملة"
1096
+ ]
1097
+ },
1098
+ {
1099
+ "id": "PC024",
1100
+ "category": "spelling_blocks_grammar",
1101
+ "input": "الحديقه واسع وجميل",
1102
+ "expected": "الحديقة واسعة وجميلة",
1103
+ "actual": "الحديقة واسعة وجميلة",
1104
+ "suggestions": [
1105
+ {
1106
+ "alternatives": [],
1107
+ "confidence": 1.0,
1108
+ "correction": "واسعة وجميلة",
1109
+ "end": 18,
1110
+ "id": "498b008e-b557-4b7e-bea7-83c6ab30645f",
1111
+ "locked": true,
1112
+ "original": "واسع وجميل",
1113
+ "priority": 3,
1114
+ "start": 8,
1115
+ "type": "grammar"
1116
+ },
1117
+ {
1118
+ "alternatives": [
1119
+ "الحديقة",
1120
+ "الحديقه"
1121
+ ],
1122
+ "confidence": 0.9,
1123
+ "correction": "الحديقة",
1124
+ "end": 7,
1125
+ "id": "2d3aaa14-5532-456a-b8cb-6a1d93b0045a",
1126
+ "locked": true,
1127
+ "original": "الحديقه",
1128
+ "priority": 2,
1129
+ "start": 0,
1130
+ "type": "spelling"
1131
+ }
1132
+ ],
1133
+ "elapsed_ms": 6524,
1134
+ "verdict": "PASS"
1135
+ },
1136
+ {
1137
+ "id": "PC025",
1138
+ "category": "spelling_blocks_grammar",
1139
+ "input": "المكتبه كبير ومنظم",
1140
+ "expected": "المكتبة كبيرة ومنظمة",
1141
+ "actual": "المكتبة كبيرة ومنظمة",
1142
+ "suggestions": [
1143
+ {
1144
+ "alternatives": [],
1145
+ "confidence": 1.0,
1146
+ "correction": "المكتبة كبيرة ومنظمة",
1147
+ "end": 18,
1148
+ "id": "a869d748-3a58-47e8-8d70-e56be4f0e8d0",
1149
+ "locked": true,
1150
+ "original": "المكتبه كبير ومنظم",
1151
+ "priority": 3,
1152
+ "start": 0,
1153
+ "type": "grammar"
1154
+ }
1155
+ ],
1156
+ "elapsed_ms": 5482,
1157
+ "verdict": "PASS"
1158
+ },
1159
+ {
1160
+ "id": "PC026",
1161
+ "category": "punctuation_near_spelling",
1162
+ "input": "ذهبت الي المدرسه وقابلت صديقتي",
1163
+ "expected": "ذهبت إلى المدرسة وقابلت صديقتي",
1164
+ "actual": "ذهبت إلى المدرسة وقابلت صديقتي.",
1165
+ "suggestions": [
1166
+ {
1167
+ "alternatives": [
1168
+ "إلى",
1169
+ "الي"
1170
+ ],
1171
+ "confidence": 0.9,
1172
+ "correction": "إلى",
1173
+ "end": 8,
1174
+ "id": "a9552cd4-8847-48b5-bf05-2adf17ba6a09",
1175
+ "locked": true,
1176
+ "original": "الي",
1177
+ "priority": 2,
1178
+ "start": 5,
1179
+ "type": "spelling"
1180
+ },
1181
+ {
1182
+ "alternatives": [
1183
+ "المدرسة",
1184
+ "المدرسه"
1185
+ ],
1186
+ "confidence": 0.9,
1187
+ "correction": "المدرسة",
1188
+ "end": 16,
1189
+ "id": "e6889aba-dc8e-4867-8861-cc9652bf62de",
1190
+ "locked": true,
1191
+ "original": "المدرسه",
1192
+ "priority": 2,
1193
+ "start": 9,
1194
+ "type": "spelling"
1195
+ },
1196
+ {
1197
+ "alternatives": [],
1198
+ "confidence": 0.8,
1199
+ "correction": "صديقتي.",
1200
+ "end": 30,
1201
+ "id": "4a3a3037-c684-40f0-98b8-069cffaa2e23",
1202
+ "locked": true,
1203
+ "original": "صديقتي",
1204
+ "priority": 1,
1205
+ "start": 24,
1206
+ "type": "punctuation"
1207
+ }
1208
+ ],
1209
+ "elapsed_ms": 6555,
1210
+ "verdict": "FAIL",
1211
+ "root_cause_component": "UNKNOWN",
1212
+ "root_cause_detail": "Unclassified failure in category 'punctuation_near_spelling'",
1213
+ "missing_words": [
1214
+ "صديقتي"
1215
+ ]
1216
+ },
1217
+ {
1218
+ "id": "PC027",
1219
+ "category": "punctuation_near_spelling",
1220
+ "input": "الكتاب مفيد جدا وانا احبه",
1221
+ "expected": "الكتاب مفيد جداً وأنا أحبه",
1222
+ "actual": "الكتاب مفيد جدا وأنا احبه.",
1223
+ "suggestions": [
1224
+ {
1225
+ "alternatives": [
1226
+ "وأنا",
1227
+ "وانا"
1228
+ ],
1229
+ "confidence": 0.9,
1230
+ "correction": "وأنا",
1231
+ "end": 20,
1232
+ "id": "e9b4c748-2526-4541-a764-35c29fd48457",
1233
+ "locked": true,
1234
+ "original": "وانا",
1235
+ "priority": 2,
1236
+ "start": 16,
1237
+ "type": "spelling"
1238
+ },
1239
+ {
1240
+ "alternatives": [],
1241
+ "confidence": 0.7,
1242
+ "correction": "احبه.",
1243
+ "end": 25,
1244
+ "id": "c677fd69-999e-4625-b1ff-58b63ef9d72c",
1245
+ "locked": true,
1246
+ "original": "احبه",
1247
+ "priority": 1,
1248
+ "start": 21,
1249
+ "type": "punctuation"
1250
+ }
1251
+ ],
1252
+ "elapsed_ms": 7093,
1253
+ "verdict": "FAIL",
1254
+ "root_cause_component": "UNKNOWN",
1255
+ "root_cause_detail": "Unclassified failure in category 'punctuation_near_spelling'",
1256
+ "missing_words": [
1257
+ "أحبه",
1258
+ "جداً"
1259
+ ]
1260
+ },
1261
+ {
1262
+ "id": "PC028",
1263
+ "category": "punctuation_near_spelling",
1264
+ "input": "المعلمه شرحت الدرس واعطت واجب",
1265
+ "expected": "المعلمة شرحت الدرس وأعطت واجب",
1266
+ "actual": "المعلمة شرحت الدرس وأعطت واجب.",
1267
+ "suggestions": [
1268
+ {
1269
+ "alternatives": [
1270
+ "المعلمة",
1271
+ "المعلمه"
1272
+ ],
1273
+ "confidence": 0.9,
1274
+ "correction": "المعلمة",
1275
+ "end": 7,
1276
+ "id": "6303550c-dcda-4885-bd5d-f3cf32fee913",
1277
+ "locked": true,
1278
+ "original": "المعلمه",
1279
+ "priority": 2,
1280
+ "start": 0,
1281
+ "type": "spelling"
1282
+ },
1283
+ {
1284
+ "alternatives": [
1285
+ "وأعطت",
1286
+ "واعطت"
1287
+ ],
1288
+ "confidence": 0.9,
1289
+ "correction": "وأعطت",
1290
+ "end": 24,
1291
+ "id": "073ef036-f7f8-4323-959b-ecacec65c8cb",
1292
+ "locked": true,
1293
+ "original": "واعطت",
1294
+ "priority": 2,
1295
+ "start": 19,
1296
+ "type": "spelling"
1297
+ },
1298
+ {
1299
+ "alternatives": [],
1300
+ "confidence": 0.8,
1301
+ "correction": "واجب.",
1302
+ "end": 29,
1303
+ "id": "c835a642-20b3-42cc-9eb2-7bfde5953f13",
1304
+ "locked": true,
1305
+ "original": "واجب",
1306
+ "priority": 1,
1307
+ "start": 25,
1308
+ "type": "punctuation"
1309
+ }
1310
+ ],
1311
+ "elapsed_ms": 6647,
1312
+ "verdict": "FAIL",
1313
+ "root_cause_component": "UNKNOWN",
1314
+ "root_cause_detail": "Unclassified failure in category 'punctuation_near_spelling'",
1315
+ "missing_words": [
1316
+ "واجب"
1317
+ ]
1318
+ },
1319
+ {
1320
+ "id": "PC029",
1321
+ "category": "punctuation_near_spelling",
1322
+ "input": "قرأت الكتاب كله ولكن لم افهمه",
1323
+ "expected": "قرأت الكتاب كله ولكن لم أفهمه",
1324
+ "actual": "قرأت الكتاب كله، ولكن لم افهمه!",
1325
+ "suggestions": [
1326
+ {
1327
+ "alternatives": [],
1328
+ "confidence": 0.8,
1329
+ "correction": "كله،",
1330
+ "end": 15,
1331
+ "id": "eb504d86-0728-4de3-af04-a01cef4035c4",
1332
+ "locked": true,
1333
+ "original": "كله",
1334
+ "priority": 1,
1335
+ "start": 12,
1336
+ "type": "punctuation"
1337
+ },
1338
+ {
1339
+ "alternatives": [],
1340
+ "confidence": 0.8,
1341
+ "correction": "افهمه!",
1342
+ "end": 29,
1343
+ "id": "ef6ebdf2-bfec-4265-ae2d-148302fc50f2",
1344
+ "locked": true,
1345
+ "original": "افهمه",
1346
+ "priority": 1,
1347
+ "start": 24,
1348
+ "type": "punctuation"
1349
+ }
1350
+ ],
1351
+ "elapsed_ms": 15374,
1352
+ "verdict": "FAIL",
1353
+ "root_cause_component": "UNKNOWN",
1354
+ "root_cause_detail": "Unclassified failure in category 'punctuation_near_spelling'",
1355
+ "missing_words": [
1356
+ "كله",
1357
+ "أفهمه"
1358
+ ]
1359
+ },
1360
+ {
1361
+ "id": "PC030",
1362
+ "category": "punctuation_near_spelling",
1363
+ "input": "الطقس بارد جدا واحتاج معطف",
1364
+ "expected": "الطقس بارد جداً وأحتاج معطف",
1365
+ "actual": "الطقس بارد جدا وأحتاج معطف.",
1366
+ "suggestions": [
1367
+ {
1368
+ "alternatives": [
1369
+ "وأحتاج",
1370
+ "واحتاج"
1371
+ ],
1372
+ "confidence": 0.9,
1373
+ "correction": "وأحتاج",
1374
+ "end": 21,
1375
+ "id": "838260ff-6976-4283-a4c4-67041ee07156",
1376
+ "locked": true,
1377
+ "original": "واحتاج",
1378
+ "priority": 2,
1379
+ "start": 15,
1380
+ "type": "spelling"
1381
+ },
1382
+ {
1383
+ "alternatives": [],
1384
+ "confidence": 0.8,
1385
+ "correction": "معطف.",
1386
+ "end": 26,
1387
+ "id": "b6484d3d-ceed-4525-ba83-582fadb9c313",
1388
+ "locked": true,
1389
+ "original": "معطف",
1390
+ "priority": 1,
1391
+ "start": 22,
1392
+ "type": "punctuation"
1393
+ }
1394
+ ],
1395
+ "elapsed_ms": 10256,
1396
+ "verdict": "FAIL",
1397
+ "root_cause_component": "UNKNOWN",
1398
+ "root_cause_detail": "Unclassified failure in category 'punctuation_near_spelling'",
1399
+ "missing_words": [
1400
+ "معطف",
1401
+ "جداً"
1402
+ ]
1403
+ },
1404
+ {
1405
+ "id": "PC031",
1406
+ "category": "three_stage_collision",
1407
+ "input": "السياره سريع والرجال يعمل في المصنع",
1408
+ "expected": "السيارة سريعة والرجال يعملون في المصنع",
1409
+ "actual": "السيارة سريعة والرجال يعملون في المصنع.",
1410
+ "suggestions": [
1411
+ {
1412
+ "alternatives": [],
1413
+ "confidence": 1.0,
1414
+ "correction": "سريعة",
1415
+ "end": 12,
1416
+ "id": "886cca67-a3b1-40aa-9e2e-9e48cbd20396",
1417
+ "locked": true,
1418
+ "original": "سريع",
1419
+ "priority": 3,
1420
+ "start": 8,
1421
+ "type": "grammar"
1422
+ },
1423
+ {
1424
+ "alternatives": [],
1425
+ "confidence": 1.0,
1426
+ "correction": "يعملون",
1427
+ "end": 25,
1428
+ "id": "7d1c814a-d5ae-4b8b-b49b-5c6181aa01e7",
1429
+ "locked": true,
1430
+ "original": "يعمل",
1431
+ "priority": 3,
1432
+ "start": 21,
1433
+ "type": "grammar"
1434
+ },
1435
+ {
1436
+ "alternatives": [
1437
+ "السيارة",
1438
+ "السياره"
1439
+ ],
1440
+ "confidence": 0.9,
1441
+ "correction": "السيارة",
1442
+ "end": 7,
1443
+ "id": "a2438eb3-9678-4c49-81f4-0175ab2e7c4b",
1444
+ "locked": true,
1445
+ "original": "السياره",
1446
+ "priority": 2,
1447
+ "start": 0,
1448
+ "type": "spelling"
1449
+ },
1450
+ {
1451
+ "alternatives": [],
1452
+ "confidence": 0.8,
1453
+ "correction": "المصنع.",
1454
+ "end": 35,
1455
+ "id": "b4696ddf-01ec-4752-8aa7-a04363a1aa1d",
1456
+ "locked": true,
1457
+ "original": "المصنع",
1458
+ "priority": 1,
1459
+ "start": 29,
1460
+ "type": "punctuation"
1461
+ }
1462
+ ],
1463
+ "elapsed_ms": 14198,
1464
+ "verdict": "FAIL",
1465
+ "root_cause_component": "UNKNOWN",
1466
+ "root_cause_detail": "Unclassified failure in category 'three_stage_collision'",
1467
+ "missing_words": [
1468
+ "المصنع"
1469
+ ]
1470
+ },
1471
+ {
1472
+ "id": "PC032",
1473
+ "category": "three_stage_collision",
1474
+ "input": "الطالبه ذكي وذهبت الي المدرسه",
1475
+ "expected": "الطالبة ذكية وذهبت إلى المدرسة",
1476
+ "actual": "الطالبة ذكية وذهبت إلى المدرسة.",
1477
+ "suggestions": [
1478
+ {
1479
+ "alternatives": [],
1480
+ "confidence": 1.0,
1481
+ "correction": "ذكية",
1482
+ "end": 11,
1483
+ "id": "d2f4ac74-cb3d-4290-a9fd-abc91c85bb10",
1484
+ "locked": true,
1485
+ "original": "ذكي",
1486
+ "priority": 3,
1487
+ "start": 8,
1488
+ "type": "grammar"
1489
+ },
1490
+ {
1491
+ "alternatives": [
1492
+ "الطالبة",
1493
+ "الطالبه"
1494
+ ],
1495
+ "confidence": 0.9,
1496
+ "correction": "الطالبة",
1497
+ "end": 7,
1498
+ "id": "a8b82b31-e7db-4976-a5c2-ec91be7ab547",
1499
+ "locked": true,
1500
+ "original": "الطالبه",
1501
+ "priority": 2,
1502
+ "start": 0,
1503
+ "type": "spelling"
1504
+ },
1505
+ {
1506
+ "alternatives": [
1507
+ "إلى",
1508
+ "الي"
1509
+ ],
1510
+ "confidence": 0.9,
1511
+ "correction": "إلى",
1512
+ "end": 21,
1513
+ "id": "e5b0cac9-3717-4e49-a3d2-37769f78917b",
1514
+ "locked": true,
1515
+ "original": "الي",
1516
+ "priority": 2,
1517
+ "start": 18,
1518
+ "type": "spelling"
1519
+ },
1520
+ {
1521
+ "alternatives": [
1522
+ "المدرسة",
1523
+ "المدرسه"
1524
+ ],
1525
+ "confidence": 0.9,
1526
+ "correction": "المدرسة.",
1527
+ "end": 29,
1528
+ "id": "aadbb78e-abb4-4230-9559-e157ad479532",
1529
+ "locked": true,
1530
+ "original": "المدرسه",
1531
+ "priority": 2,
1532
+ "start": 22,
1533
+ "type": "spelling"
1534
+ }
1535
+ ],
1536
+ "elapsed_ms": 15287,
1537
+ "verdict": "FAIL",
1538
+ "root_cause_component": "UNKNOWN",
1539
+ "root_cause_detail": "Unclassified failure in category 'three_stage_collision'",
1540
+ "missing_words": [
1541
+ "المدرسة"
1542
+ ]
1543
+ },
1544
+ {
1545
+ "id": "PC033",
1546
+ "category": "three_stage_collision",
1547
+ "input": "المدرسه كبير والطلاب يدرس بجد",
1548
+ "expected": "المدرسة كبيرة والطلاب يدرسون بجد",
1549
+ "actual": "المدرسة كبيرة والطلاب يدرسون بجد.",
1550
+ "suggestions": [
1551
+ {
1552
+ "alternatives": [],
1553
+ "confidence": 1.0,
1554
+ "correction": "كبيرة",
1555
+ "end": 12,
1556
+ "id": "1146de37-f721-4da7-aeae-148280e5c726",
1557
+ "locked": true,
1558
+ "original": "كبير",
1559
+ "priority": 3,
1560
+ "start": 8,
1561
+ "type": "grammar"
1562
+ },
1563
+ {
1564
+ "alternatives": [],
1565
+ "confidence": 1.0,
1566
+ "correction": "يدرسون",
1567
+ "end": 25,
1568
+ "id": "d590e950-1a7f-462d-8649-b9e7d06ce77a",
1569
+ "locked": true,
1570
+ "original": "يدرس",
1571
+ "priority": 3,
1572
+ "start": 21,
1573
+ "type": "grammar"
1574
+ },
1575
+ {
1576
+ "alternatives": [
1577
+ "المدرسة",
1578
+ "المدرسه"
1579
+ ],
1580
+ "confidence": 0.9,
1581
+ "correction": "المدرسة",
1582
+ "end": 7,
1583
+ "id": "d6834c24-f079-4e20-8d6a-0556349fdf6c",
1584
+ "locked": true,
1585
+ "original": "المدرسه",
1586
+ "priority": 2,
1587
+ "start": 0,
1588
+ "type": "spelling"
1589
+ },
1590
+ {
1591
+ "alternatives": [],
1592
+ "confidence": 0.8,
1593
+ "correction": "بجد.",
1594
+ "end": 29,
1595
+ "id": "d8e8bd5c-ecd0-426c-9e5b-1fac852c056c",
1596
+ "locked": true,
1597
+ "original": "بجد",
1598
+ "priority": 1,
1599
+ "start": 26,
1600
+ "type": "punctuation"
1601
+ }
1602
+ ],
1603
+ "elapsed_ms": 15913,
1604
+ "verdict": "FAIL",
1605
+ "root_cause_component": "UNKNOWN",
1606
+ "root_cause_detail": "Unclassified failure in category 'three_stage_collision'",
1607
+ "missing_words": [
1608
+ "بجد"
1609
+ ]
1610
+ },
1611
+ {
1612
+ "id": "PC034",
1613
+ "category": "three_stage_collision",
1614
+ "input": "الحكومه اعلن قرار جديد والمواطنون يتابع",
1615
+ "expected": "الحكومة أعلنت قراراً جديداً والمواطنون يتابعون",
1616
+ "actual": "الحكومة أعلنت قرارا جديدا والمواطن يتابع.",
1617
+ "suggestions": [
1618
+ {
1619
+ "alternatives": [],
1620
+ "confidence": 1.0,
1621
+ "correction": "أعلنت قرارا جديدا والمواطن",
1622
+ "end": 33,
1623
+ "id": "8daddae4-9d5a-49a0-b808-25f5e516b223",
1624
+ "locked": true,
1625
+ "original": "اعلن قرار جديد والمواطنون",
1626
+ "priority": 3,
1627
+ "start": 8,
1628
+ "type": "grammar"
1629
+ },
1630
+ {
1631
+ "alternatives": [
1632
+ "الحكومة",
1633
+ "الحكومه"
1634
+ ],
1635
+ "confidence": 0.9,
1636
+ "correction": "الحكومة",
1637
+ "end": 7,
1638
+ "id": "cbaed9a2-09a8-4634-82d9-b05fc65406a1",
1639
+ "locked": true,
1640
+ "original": "الحكومه",
1641
+ "priority": 2,
1642
+ "start": 0,
1643
+ "type": "spelling"
1644
+ },
1645
+ {
1646
+ "alternatives": [],
1647
+ "confidence": 0.8,
1648
+ "correction": "يتابع.",
1649
+ "end": 39,
1650
+ "id": "b6819c7e-06e5-4978-be49-69a82a22d31b",
1651
+ "locked": true,
1652
+ "original": "يتابع",
1653
+ "priority": 1,
1654
+ "start": 34,
1655
+ "type": "punctuation"
1656
+ }
1657
+ ],
1658
+ "elapsed_ms": 17993,
1659
+ "verdict": "FAIL",
1660
+ "root_cause_component": "UNKNOWN",
1661
+ "root_cause_detail": "Unclassified failure in category 'three_stage_collision'",
1662
+ "missing_words": [
1663
+ "جديداً",
1664
+ "يتابعون",
1665
+ "قراراً",
1666
+ "والمواطنون"
1667
+ ]
1668
+ },
1669
+ {
1670
+ "id": "PC035",
1671
+ "category": "three_stage_collision",
1672
+ "input": "الشركه نجح في المشرووع والموظفون يحتفل",
1673
+ "expected": "الشركة نجحت في المشروع والموظفون يحتفلون",
1674
+ "actual": "الشركة نجحت في المشروع والموظفون يحتفلون.",
1675
+ "suggestions": [
1676
+ {
1677
+ "alternatives": [],
1678
+ "confidence": 1.0,
1679
+ "correction": "نجحت",
1680
+ "end": 10,
1681
+ "id": "25f73cc3-ff1d-4b5b-80dd-c81a15ac4c41",
1682
+ "locked": true,
1683
+ "original": "نجح",
1684
+ "priority": 3,
1685
+ "start": 7,
1686
+ "type": "grammar"
1687
+ },
1688
+ {
1689
+ "alternatives": [],
1690
+ "confidence": 1.0,
1691
+ "correction": "يحتفلون.",
1692
+ "end": 38,
1693
+ "id": "5a910be6-4732-4d06-9287-ee5d34da92f9",
1694
+ "locked": true,
1695
+ "original": "يحتفل",
1696
+ "priority": 3,
1697
+ "start": 33,
1698
+ "type": "grammar"
1699
+ },
1700
+ {
1701
+ "alternatives": [
1702
+ "الشركة",
1703
+ "الشركه"
1704
+ ],
1705
+ "confidence": 0.9,
1706
+ "correction": "الشركة",
1707
+ "end": 6,
1708
+ "id": "eee05da3-e88d-4f2e-afda-6dae02d236f9",
1709
+ "locked": true,
1710
+ "original": "الشركه",
1711
+ "priority": 2,
1712
+ "start": 0,
1713
+ "type": "spelling"
1714
+ },
1715
+ {
1716
+ "alternatives": [
1717
+ "المشروع",
1718
+ "المشرووع"
1719
+ ],
1720
+ "confidence": 0.7,
1721
+ "correction": "المشروع",
1722
+ "end": 22,
1723
+ "id": "8435592e-396d-48db-8948-622835399465",
1724
+ "locked": true,
1725
+ "original": "المشرووع",
1726
+ "priority": 2,
1727
+ "start": 14,
1728
+ "type": "spelling"
1729
+ }
1730
+ ],
1731
+ "elapsed_ms": 15805,
1732
+ "verdict": "FAIL",
1733
+ "root_cause_component": "UNKNOWN",
1734
+ "root_cause_detail": "Unclassified failure in category 'three_stage_collision'",
1735
+ "missing_words": [
1736
+ "يحتفلون"
1737
+ ]
1738
+ },
1739
+ {
1740
+ "id": "PC036",
1741
+ "category": "adjacent_corrections",
1742
+ "input": "الولد الصغيره ذهب الي المدرسه",
1743
+ "expected": "الولد الصغير ذهب إلى المدرسة",
1744
+ "actual": "الولد الصغير ذهب إلى المدرسة.",
1745
+ "suggestions": [
1746
+ {
1747
+ "alternatives": [],
1748
+ "confidence": 1.0,
1749
+ "correction": "الصغير",
1750
+ "end": 13,
1751
+ "id": "24099b4d-e450-4ab4-af68-5416f8526c40",
1752
+ "locked": true,
1753
+ "original": "الصغيره",
1754
+ "priority": 3,
1755
+ "start": 6,
1756
+ "type": "grammar"
1757
+ },
1758
+ {
1759
+ "alternatives": [
1760
+ "إلى",
1761
+ "الي"
1762
+ ],
1763
+ "confidence": 0.9,
1764
+ "correction": "إلى",
1765
+ "end": 21,
1766
+ "id": "016150b8-c369-4cc9-9c41-d81ba42795f6",
1767
+ "locked": true,
1768
+ "original": "الي",
1769
+ "priority": 2,
1770
+ "start": 18,
1771
+ "type": "spelling"
1772
+ },
1773
+ {
1774
+ "alternatives": [
1775
+ "المدرسة",
1776
+ "المدرسه"
1777
+ ],
1778
+ "confidence": 0.9,
1779
+ "correction": "المدرسة.",
1780
+ "end": 29,
1781
+ "id": "4387587d-0474-4d7c-b379-6869daaf775d",
1782
+ "locked": true,
1783
+ "original": "المدرسه",
1784
+ "priority": 2,
1785
+ "start": 22,
1786
+ "type": "spelling"
1787
+ }
1788
+ ],
1789
+ "elapsed_ms": 12191,
1790
+ "verdict": "FAIL",
1791
+ "root_cause_component": "UNKNOWN",
1792
+ "root_cause_detail": "Unclassified failure in category 'adjacent_corrections'",
1793
+ "missing_words": [
1794
+ "المدرسة"
1795
+ ]
1796
+ },
1797
+ {
1798
+ "id": "PC037",
1799
+ "category": "adjacent_corrections",
1800
+ "input": "قال المعلمون للطالبه ادرسي بجد",
1801
+ "expected": "قال المعلمون للطالبة ادرسي بجد",
1802
+ "actual": "قال المعلمون للطالبة ادرسي بجد.",
1803
+ "suggestions": [
1804
+ {
1805
+ "alternatives": [],
1806
+ "confidence": 1.0,
1807
+ "correction": "للطالبة",
1808
+ "end": 20,
1809
+ "id": "422d75bb-dd15-4f8e-831f-614c293d8592",
1810
+ "locked": true,
1811
+ "original": "للطالبه",
1812
+ "priority": 2,
1813
+ "start": 13,
1814
+ "type": "spelling"
1815
+ },
1816
+ {
1817
+ "alternatives": [],
1818
+ "confidence": 0.8,
1819
+ "correction": "بجد.",
1820
+ "end": 30,
1821
+ "id": "09f3f4a2-b88c-43e8-9d12-8b9122ecc2aa",
1822
+ "locked": true,
1823
+ "original": "بجد",
1824
+ "priority": 1,
1825
+ "start": 27,
1826
+ "type": "punctuation"
1827
+ }
1828
+ ],
1829
+ "elapsed_ms": 17159,
1830
+ "verdict": "FAIL",
1831
+ "root_cause_component": "UNKNOWN",
1832
+ "root_cause_detail": "Unclassified failure in category 'adjacent_corrections'",
1833
+ "missing_words": [
1834
+ "بجد"
1835
+ ]
1836
+ },
1837
+ {
1838
+ "id": "PC038",
1839
+ "category": "adjacent_corrections",
1840
+ "input": "الكتب القديمه في المكتبه الكبيره",
1841
+ "expected": "الكتب القديمة في المكتبة الكبيرة",
1842
+ "actual": "الكتب القديمة في المكتبة الكبيرة.",
1843
+ "suggestions": [
1844
+ {
1845
+ "alternatives": [],
1846
+ "confidence": 1.0,
1847
+ "correction": "القديمة",
1848
+ "end": 13,
1849
+ "id": "9be505f1-e944-4d63-b7c0-ef4f59afd68a",
1850
+ "locked": true,
1851
+ "original": "ال��ديمه",
1852
+ "priority": 2,
1853
+ "start": 6,
1854
+ "type": "spelling"
1855
+ },
1856
+ {
1857
+ "alternatives": [],
1858
+ "confidence": 1.0,
1859
+ "correction": "الكبيرة.",
1860
+ "end": 32,
1861
+ "id": "247a237a-458d-4863-9b64-32b6bffb52c0",
1862
+ "locked": true,
1863
+ "original": "الكبيره",
1864
+ "priority": 2,
1865
+ "start": 25,
1866
+ "type": "spelling"
1867
+ },
1868
+ {
1869
+ "alternatives": [
1870
+ "المكتبة",
1871
+ "المكتبه"
1872
+ ],
1873
+ "confidence": 0.9,
1874
+ "correction": "المكتبة",
1875
+ "end": 24,
1876
+ "id": "3b60bb54-0e91-4b4c-ad69-04e2ad9c2b6b",
1877
+ "locked": true,
1878
+ "original": "المكتبه",
1879
+ "priority": 2,
1880
+ "start": 17,
1881
+ "type": "spelling"
1882
+ }
1883
+ ],
1884
+ "elapsed_ms": 10620,
1885
+ "verdict": "FAIL",
1886
+ "root_cause_component": "UNKNOWN",
1887
+ "root_cause_detail": "Unclassified failure in category 'adjacent_corrections'",
1888
+ "missing_words": [
1889
+ "الكبيرة"
1890
+ ]
1891
+ },
1892
+ {
1893
+ "id": "PC039",
1894
+ "category": "adjacent_corrections",
1895
+ "input": "رأيت البنت الجميله في الحديقه",
1896
+ "expected": "رأيت البنت الجميلة في الحديقة",
1897
+ "actual": "رأيت البنت الجميلة في الحديقة.",
1898
+ "suggestions": [
1899
+ {
1900
+ "alternatives": [],
1901
+ "confidence": 1.0,
1902
+ "correction": "الجميلة",
1903
+ "end": 18,
1904
+ "id": "16a1062c-3551-4566-b9c5-75ad4dac1213",
1905
+ "locked": true,
1906
+ "original": "الجميله",
1907
+ "priority": 2,
1908
+ "start": 11,
1909
+ "type": "spelling"
1910
+ },
1911
+ {
1912
+ "alternatives": [
1913
+ "الحديقة",
1914
+ "الحديقه"
1915
+ ],
1916
+ "confidence": 0.9,
1917
+ "correction": "الحديقة.",
1918
+ "end": 29,
1919
+ "id": "5d053b95-53fe-4609-b713-0badc8188ef0",
1920
+ "locked": true,
1921
+ "original": "الحديقه",
1922
+ "priority": 2,
1923
+ "start": 22,
1924
+ "type": "spelling"
1925
+ }
1926
+ ],
1927
+ "elapsed_ms": 15421,
1928
+ "verdict": "FAIL",
1929
+ "root_cause_component": "UNKNOWN",
1930
+ "root_cause_detail": "Unclassified failure in category 'adjacent_corrections'",
1931
+ "missing_words": [
1932
+ "الحديقة"
1933
+ ]
1934
+ },
1935
+ {
1936
+ "id": "PC040",
1937
+ "category": "adjacent_corrections",
1938
+ "input": "المعلمه الجديده شرحت الدرس",
1939
+ "expected": "المعلمة الجديدة شرحت الدرس",
1940
+ "actual": "المعلمة الجديدة شرحت الدرس.",
1941
+ "suggestions": [
1942
+ {
1943
+ "alternatives": [],
1944
+ "confidence": 1.0,
1945
+ "correction": "الجديدة",
1946
+ "end": 15,
1947
+ "id": "92ff1320-5695-4989-bdaf-bddddb5288fd",
1948
+ "locked": true,
1949
+ "original": "الجديده",
1950
+ "priority": 2,
1951
+ "start": 8,
1952
+ "type": "spelling"
1953
+ },
1954
+ {
1955
+ "alternatives": [
1956
+ "المعلمة",
1957
+ "المعلمه"
1958
+ ],
1959
+ "confidence": 0.9,
1960
+ "correction": "المعلمة",
1961
+ "end": 7,
1962
+ "id": "1cfd4225-3428-43c4-ba3f-f3b1064bc055",
1963
+ "locked": true,
1964
+ "original": "المعلمه",
1965
+ "priority": 2,
1966
+ "start": 0,
1967
+ "type": "spelling"
1968
+ },
1969
+ {
1970
+ "alternatives": [],
1971
+ "confidence": 0.8,
1972
+ "correction": "الدرس.",
1973
+ "end": 26,
1974
+ "id": "fb04eef4-8323-4ff4-a402-3b93b0e73aae",
1975
+ "locked": true,
1976
+ "original": "الدرس",
1977
+ "priority": 1,
1978
+ "start": 21,
1979
+ "type": "punctuation"
1980
+ }
1981
+ ],
1982
+ "elapsed_ms": 17732,
1983
+ "verdict": "FAIL",
1984
+ "root_cause_component": "UNKNOWN",
1985
+ "root_cause_detail": "Unclassified failure in category 'adjacent_corrections'",
1986
+ "missing_words": [
1987
+ "الدرس"
1988
+ ]
1989
+ },
1990
+ {
1991
+ "id": "PC041",
1992
+ "category": "multi_stage_collision",
1993
+ "input": "الدكتور كتب التقريير والممرضات ساعد المرضى",
1994
+ "expected": "الدكتور كتب التقرير والممرضات ساعدن المرضى",
1995
+ "actual": "الدكتور كتب التقرير والممرضات ساعدن المرضى.",
1996
+ "suggestions": [
1997
+ {
1998
+ "alternatives": [],
1999
+ "confidence": 1.0,
2000
+ "correction": "ساعدن",
2001
+ "end": 35,
2002
+ "id": "f46a6796-3f24-4f6e-ae17-b8f663daaf68",
2003
+ "locked": true,
2004
+ "original": "ساعد",
2005
+ "priority": 3,
2006
+ "start": 31,
2007
+ "type": "grammar"
2008
+ },
2009
+ {
2010
+ "alternatives": [
2011
+ "التقرير",
2012
+ "التقريير"
2013
+ ],
2014
+ "confidence": 0.7,
2015
+ "correction": "التقرير",
2016
+ "end": 20,
2017
+ "id": "217998c0-47a2-4f8a-96fc-64bfb2b57e25",
2018
+ "locked": true,
2019
+ "original": "التقريير",
2020
+ "priority": 2,
2021
+ "start": 12,
2022
+ "type": "spelling"
2023
+ },
2024
+ {
2025
+ "alternatives": [],
2026
+ "confidence": 0.8,
2027
+ "correction": "المرضى.",
2028
+ "end": 42,
2029
+ "id": "d56bfed5-fbb7-443d-965e-bdf05b299284",
2030
+ "locked": true,
2031
+ "original": "المرضى",
2032
+ "priority": 1,
2033
+ "start": 36,
2034
+ "type": "punctuation"
2035
+ }
2036
+ ],
2037
+ "elapsed_ms": 14752,
2038
+ "verdict": "FAIL",
2039
+ "root_cause_component": "PIPELINE",
2040
+ "root_cause_detail": "Multi-stage interaction failure",
2041
+ "missing_words": [
2042
+ "المرضى"
2043
+ ]
2044
+ },
2045
+ {
2046
+ "id": "PC042",
2047
+ "category": "multi_stage_collision",
2048
+ "input": "الطلاب حضر المحاضره والاستاذ شرح الدرس",
2049
+ "expected": "الطلاب حضروا المحاضرة والأستاذ شرح الدرس",
2050
+ "actual": "الطلاب حضرو المحاضرة والأستاذ شرح الدرس.",
2051
+ "suggestions": [
2052
+ {
2053
+ "alternatives": [],
2054
+ "confidence": 1.0,
2055
+ "correction": "حضرو المحاضرة والأستاذ",
2056
+ "end": 28,
2057
+ "id": "155ebcbc-fde4-4578-8966-d2901c5897e4",
2058
+ "locked": true,
2059
+ "original": "حضر المحاضره والاستاذ",
2060
+ "priority": 3,
2061
+ "start": 7,
2062
+ "type": "grammar"
2063
+ },
2064
+ {
2065
+ "alternatives": [],
2066
+ "confidence": 0.8,
2067
+ "correction": "الدرس.",
2068
+ "end": 38,
2069
+ "id": "1d90d0bd-21eb-4be9-9389-1881f9e024e7",
2070
+ "locked": true,
2071
+ "original": "الدرس",
2072
+ "priority": 1,
2073
+ "start": 33,
2074
+ "type": "punctuation"
2075
+ }
2076
+ ],
2077
+ "elapsed_ms": 20525,
2078
+ "verdict": "FAIL",
2079
+ "root_cause_component": "PIPELINE",
2080
+ "root_cause_detail": "Multi-stage interaction failure",
2081
+ "missing_words": [
2082
+ "الدرس",
2083
+ "حضروا"
2084
+ ]
2085
+ },
2086
+ {
2087
+ "id": "PC043",
2088
+ "category": "multi_stage_collision",
2089
+ "input": "الامهات طبخ الطعام والاطفال لعب في الحديقه",
2090
+ "expected": "الأمهات طبخن الطعام والأطفال لعبوا في الحديقة",
2091
+ "actual": "الأمهات طبخن الطعام والأطفال لعبوا في الحديقة.",
2092
+ "suggestions": [
2093
+ {
2094
+ "alternatives": [],
2095
+ "confidence": 1.0,
2096
+ "correction": "الأمهات طبخن",
2097
+ "end": 11,
2098
+ "id": "011dc180-af99-4fe3-8945-94e462f9cea7",
2099
+ "locked": true,
2100
+ "original": "الامهات طبخ",
2101
+ "priority": 3,
2102
+ "start": 0,
2103
+ "type": "grammar"
2104
+ },
2105
+ {
2106
+ "alternatives": [],
2107
+ "confidence": 1.0,
2108
+ "correction": "لعبوا",
2109
+ "end": 31,
2110
+ "id": "05a8998e-c56a-4b9e-9e47-eb677007ecd4",
2111
+ "locked": true,
2112
+ "original": "لعب",
2113
+ "priority": 3,
2114
+ "start": 28,
2115
+ "type": "grammar"
2116
+ },
2117
+ {
2118
+ "alternatives": [
2119
+ "والأطفال",
2120
+ "والاطفال"
2121
+ ],
2122
+ "confidence": 0.9,
2123
+ "correction": "والأطفال",
2124
+ "end": 27,
2125
+ "id": "83ee5b0e-3b78-4ede-a89b-7562dfd13298",
2126
+ "locked": true,
2127
+ "original": "والاطفال",
2128
+ "priority": 2,
2129
+ "start": 19,
2130
+ "type": "spelling"
2131
+ },
2132
+ {
2133
+ "alternatives": [
2134
+ "الحديقة",
2135
+ "الحديقه"
2136
+ ],
2137
+ "confidence": 0.9,
2138
+ "correction": "الحديقة.",
2139
+ "end": 42,
2140
+ "id": "3bc385fa-d8f8-4e69-8b33-1ddd9a66db86",
2141
+ "locked": true,
2142
+ "original": "الحديقه",
2143
+ "priority": 2,
2144
+ "start": 35,
2145
+ "type": "spelling"
2146
+ }
2147
+ ],
2148
+ "elapsed_ms": 15896,
2149
+ "verdict": "FAIL",
2150
+ "root_cause_component": "PIPELINE",
2151
+ "root_cause_detail": "Multi-stage interaction failure",
2152
+ "missing_words": [
2153
+ "الحديقة"
2154
+ ]
2155
+ },
2156
+ {
2157
+ "id": "PC044",
2158
+ "category": "spelling_grammar_overlap",
2159
+ "verdict": "ERROR",
2160
+ "error": "('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2161
+ },
2162
+ {
2163
+ "id": "PC045",
2164
+ "category": "spelling_grammar_overlap",
2165
+ "verdict": "ERROR",
2166
+ "error": "('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2167
+ },
2168
+ {
2169
+ "id": "PC046",
2170
+ "category": "three_stage_collision",
2171
+ "verdict": "ERROR",
2172
+ "error": "('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2173
+ },
2174
+ {
2175
+ "id": "PC047",
2176
+ "category": "three_stage_collision",
2177
+ "verdict": "ERROR",
2178
+ "error": "('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2179
+ },
2180
+ {
2181
+ "id": "PC048",
2182
+ "category": "adjacent_corrections",
2183
+ "verdict": "ERROR",
2184
+ "error": "('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2185
+ },
2186
+ {
2187
+ "id": "PC049",
2188
+ "category": "adjacent_corrections",
2189
+ "input": "الرجل الطويله وقف بجانب البنايه",
2190
+ "expected": "الرجل الطويل وقف بجانب البناية",
2191
+ "actual": "الرجل الطويل وقف بجانب البنية.",
2192
+ "suggestions": [
2193
+ {
2194
+ "alternatives": [],
2195
+ "confidence": 1.0,
2196
+ "correction": "الطويل",
2197
+ "end": 13,
2198
+ "id": "43dad62b-3ae8-4a2c-b0e9-a72c5db91feb",
2199
+ "locked": true,
2200
+ "original": "الطويله",
2201
+ "priority": 3,
2202
+ "start": 6,
2203
+ "type": "grammar"
2204
+ },
2205
+ {
2206
+ "alternatives": [],
2207
+ "confidence": 1.0,
2208
+ "correction": "البنية.",
2209
+ "end": 31,
2210
+ "id": "2e89293a-0146-424a-97d4-99928845678f",
2211
+ "locked": true,
2212
+ "original": "البنايه",
2213
+ "priority": 3,
2214
+ "start": 24,
2215
+ "type": "grammar"
2216
+ }
2217
+ ],
2218
+ "elapsed_ms": 5280,
2219
+ "verdict": "FAIL",
2220
+ "root_cause_component": "UNKNOWN",
2221
+ "root_cause_detail": "Unclassified failure in category 'adjacent_corrections'",
2222
+ "missing_words": [
2223
+ "البناية"
2224
+ ]
2225
+ },
2226
+ {
2227
+ "id": "PC050",
2228
+ "category": "multi_stage_collision",
2229
+ "verdict": "ERROR",
2230
+ "error": "('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2231
+ }
2232
+ ]
2233
+ }
tests/v2/reports/benchmark_matrix.json CHANGED
@@ -1,71 +1,71 @@
1
  {
2
- "timestamp": "2026-06-23T20:07:04Z",
3
- "l1_timestamp": "2026-06-23T19:26:59Z",
4
- "l2_timestamp": "2026-06-23T19:55:43Z",
5
- "l3_timestamp": "2026-06-23T20:07:04Z",
6
  "l1_summary": {
7
  "spelling": {
8
- "TP": 88,
9
- "TN": 115,
10
- "FP": 112,
11
- "FN": 5,
12
  "ERR": 0,
13
- "changed": 200,
14
- "total": 320,
15
- "change_rate": 0.625,
16
- "pass_rate": 0.6344
17
  },
18
  "grammar": {
19
- "TP": 86,
20
- "TN": 101,
21
- "FP": 110,
22
- "FN": 23,
23
  "ERR": 0,
24
- "changed": 196,
25
- "total": 320,
26
- "change_rate": 0.6125,
27
- "pass_rate": 0.5844
28
  },
29
  "punctuation": {
30
  "TP": 0,
31
- "TN": 160,
32
- "FP": 158,
33
- "FN": 2,
34
  "ERR": 0,
35
- "changed": 285,
36
- "total": 320,
37
- "change_rate": 0.8906,
38
- "pass_rate": 0.5
39
  }
40
  },
41
  "l2_summary": {
42
  "spelling": {
43
- "TP": 88,
44
- "TN": 115,
45
- "FP": 112,
46
- "FN": 5,
47
- "pass_rate": 0.6344
48
  },
49
  "grammar": {
50
- "TP": 86,
51
- "TN": 101,
52
- "FP": 110,
53
- "FN": 23,
54
- "pass_rate": 0.5844
55
  },
56
  "punctuation": {
57
  "TP": 0,
58
- "TN": 111,
59
- "FP": 207,
60
- "FN": 2,
61
- "pass_rate": 0.3469
62
  }
63
  },
64
  "l3_summary": {
65
- "TP": 88,
66
- "TN": 154,
67
- "FP": 78,
68
- "FN": 0,
69
- "pass_rate": 0.7562
70
  }
71
  }
 
1
  {
2
+ "timestamp": "2026-06-27T13:51:23Z",
3
+ "l1_timestamp": "2026-06-27T13:51:13Z",
4
+ "l2_timestamp": "2026-06-27T13:51:18Z",
5
+ "l3_timestamp": "2026-06-27T13:51:19Z",
6
  "l1_summary": {
7
  "spelling": {
8
+ "TP": 0,
9
+ "TN": 207,
10
+ "FP": 3,
11
+ "FN": 114,
12
  "ERR": 0,
13
+ "changed": 3,
14
+ "total": 324,
15
+ "change_rate": 0.0093,
16
+ "pass_rate": 0.6389
17
  },
18
  "grammar": {
19
+ "TP": 0,
20
+ "TN": 209,
21
+ "FP": 1,
22
+ "FN": 114,
23
  "ERR": 0,
24
+ "changed": 1,
25
+ "total": 324,
26
+ "change_rate": 0.0031,
27
+ "pass_rate": 0.6451
28
  },
29
  "punctuation": {
30
  "TP": 0,
31
+ "TN": 210,
32
+ "FP": 0,
33
+ "FN": 114,
34
  "ERR": 0,
35
+ "changed": 9,
36
+ "total": 324,
37
+ "change_rate": 0.0278,
38
+ "pass_rate": 0.6481
39
  }
40
  },
41
  "l2_summary": {
42
  "spelling": {
43
+ "TP": 0,
44
+ "TN": 0,
45
+ "FP": 324,
46
+ "FN": 0,
47
+ "pass_rate": 0.0
48
  },
49
  "grammar": {
50
+ "TP": 0,
51
+ "TN": 0,
52
+ "FP": 324,
53
+ "FN": 0,
54
+ "pass_rate": 0.0
55
  },
56
  "punctuation": {
57
  "TP": 0,
58
+ "TN": 0,
59
+ "FP": 324,
60
+ "FN": 0,
61
+ "pass_rate": 0.0
62
  }
63
  },
64
  "l3_summary": {
65
+ "TP": 0,
66
+ "TN": 210,
67
+ "FP": 0,
68
+ "FN": 114,
69
+ "pass_rate": 0.6481
70
  }
71
  }
tests/v2/reports/level1_raw_results.json CHANGED
The diff for this file is too large to render. See raw diff
 
tests/v2/reports/level2_solo_results.json CHANGED
The diff for this file is too large to render. See raw diff
 
tests/v2/reports/level3_integrated_results.json CHANGED
The diff for this file is too large to render. See raw diff