youssefreda9 commited on
Commit
ec36a6d
·
1 Parent(s): e128e0e

Phase A: Fix verdict logic - strip terminal punctuation before correction comparison

Browse files
tests/v2/debug_verdict.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ d = json.load(open('tests/v2/reports/level3_integrated_results.json', 'r', encoding='utf-8'))
4
+ for r in d['results'][:5]:
5
+ print(f"ID: {r['id']}")
6
+ print(f" IN: {r['input_text']}")
7
+ print(f" EXP: {r['expected']}")
8
+ print(f" OUT: {r['pipeline_corrected']}")
9
+ print(f" V: {r['verdict']} | {r['detail']}")
10
+ print()
tests/v2/reports/benchmark_matrix.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "timestamp": "2026-06-23T18:55:12Z",
3
+ "l1_timestamp": null,
4
+ "l2_timestamp": "2026-06-23T18:55:12Z",
5
+ "l3_timestamp": "2026-06-23T18:54:52Z",
6
+ "l2_summary": {
7
+ "spelling": {
8
+ "TP": 0,
9
+ "TN": 19,
10
+ "FP": 11,
11
+ "FN": 0,
12
+ "pass_rate": 0.6333
13
+ },
14
+ "grammar": {
15
+ "TP": 0,
16
+ "TN": 25,
17
+ "FP": 5,
18
+ "FN": 0,
19
+ "pass_rate": 0.8333
20
+ },
21
+ "punctuation": {
22
+ "TP": 0,
23
+ "TN": 1,
24
+ "FP": 29,
25
+ "FN": 0,
26
+ "pass_rate": 0.0333
27
+ }
28
+ },
29
+ "l3_summary": {
30
+ "TP": 22,
31
+ "TN": 0,
32
+ "FP": 58,
33
+ "FN": 0,
34
+ "pass_rate": 0.275
35
+ }
36
+ }
tests/v2/reports/level2_solo_results.json ADDED
@@ -0,0 +1,568 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "timestamp": "2026-06-23T18:55:12Z",
3
+ "target": "https://bayan10-bayan-api.hf.space",
4
+ "analysis": {
5
+ "total": 30,
6
+ "by_model": {
7
+ "spelling": {
8
+ "TP": 0,
9
+ "TN": 19,
10
+ "FP": 11,
11
+ "FN": 0,
12
+ "pass_rate": 0.6333
13
+ },
14
+ "grammar": {
15
+ "TP": 0,
16
+ "TN": 25,
17
+ "FP": 5,
18
+ "FN": 0,
19
+ "pass_rate": 0.8333
20
+ },
21
+ "punctuation": {
22
+ "TP": 0,
23
+ "TN": 1,
24
+ "FP": 29,
25
+ "FN": 0,
26
+ "pass_rate": 0.0333
27
+ }
28
+ },
29
+ "by_dataset": {
30
+ "entities": {
31
+ "total": 30,
32
+ "spelling": {
33
+ "TP": 0,
34
+ "TN": 19,
35
+ "FP": 11,
36
+ "FN": 0,
37
+ "pass_rate": 0.6333
38
+ },
39
+ "grammar": {
40
+ "TP": 0,
41
+ "TN": 25,
42
+ "FP": 5,
43
+ "FN": 0,
44
+ "pass_rate": 0.8333
45
+ },
46
+ "punctuation": {
47
+ "TP": 0,
48
+ "TN": 1,
49
+ "FP": 29,
50
+ "FN": 0,
51
+ "pass_rate": 0.0333
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "results": [
57
+ {
58
+ "id": "E001",
59
+ "dataset": "entities",
60
+ "category": "person",
61
+ "input_text": "محمد صلاح لاعب كرة قدم مصري",
62
+ "expected": "محمد صلاح لاعب كرة قدم مصري",
63
+ "severity": "major",
64
+ "spelling_solo": "محمد صلاح لاعب كرة قدم مصري",
65
+ "spelling_ms": 2410,
66
+ "grammar_solo": "محمد صلاح لاعب كرة قدم مصري",
67
+ "grammar_ms": 5530,
68
+ "punctuation_solo": "محمد صلاح لاعب كرة قدم مصري.",
69
+ "punctuation_ms": 5395,
70
+ "spelling_verdict": "TN",
71
+ "grammar_verdict": "TN",
72
+ "punctuation_verdict": "FP"
73
+ },
74
+ {
75
+ "id": "E002",
76
+ "dataset": "entities",
77
+ "category": "person",
78
+ "input_text": "عبدالله يدرس في الجامعة",
79
+ "expected": "عبدالله يدرس في الجامعة",
80
+ "severity": "major",
81
+ "spelling_solo": "عبد الله يدرس في الجامعة",
82
+ "spelling_ms": 5223,
83
+ "grammar_solo": "عبدالله يدرس في الجامعة",
84
+ "grammar_ms": 3398,
85
+ "punctuation_solo": "عبدالله يدرس في الجامعة.",
86
+ "punctuation_ms": 5254,
87
+ "spelling_verdict": "FP",
88
+ "grammar_verdict": "TN",
89
+ "punctuation_verdict": "FP"
90
+ },
91
+ {
92
+ "id": "E003",
93
+ "dataset": "entities",
94
+ "category": "person",
95
+ "input_text": "عبد الرحمن أخي الأكبر",
96
+ "expected": "عبد الرحمن أخي الأكبر",
97
+ "severity": "major",
98
+ "spelling_solo": "عبد الرحمن أخي الأكبر",
99
+ "spelling_ms": 6535,
100
+ "grammar_solo": "عبد الرحمن أخي الأكبر",
101
+ "grammar_ms": 7989,
102
+ "punctuation_solo": "عبد الرحمن أخي الأكبر.",
103
+ "punctuation_ms": 4209,
104
+ "spelling_verdict": "TN",
105
+ "grammar_verdict": "TN",
106
+ "punctuation_verdict": "FP"
107
+ },
108
+ {
109
+ "id": "E004",
110
+ "dataset": "entities",
111
+ "category": "person",
112
+ "input_text": "أحمد محمود يعمل مهندساً",
113
+ "expected": "أحمد محمود يعمل مهندساً",
114
+ "severity": "major",
115
+ "spelling_solo": "أحمد محمود يعمل مهندسا",
116
+ "spelling_ms": 4471,
117
+ "grammar_solo": "أحمد محمود يعمل مهندسا",
118
+ "grammar_ms": 4225,
119
+ "punctuation_solo": "أحمد محمود يعمل مهندساً.",
120
+ "punctuation_ms": 6024,
121
+ "spelling_verdict": "TN",
122
+ "grammar_verdict": "TN",
123
+ "punctuation_verdict": "FP"
124
+ },
125
+ {
126
+ "id": "E005",
127
+ "dataset": "entities",
128
+ "category": "person",
129
+ "input_text": "الدكتور حسن علي أستاذ جامعي",
130
+ "expected": "الدكتور حسن علي أستاذ جامعي",
131
+ "severity": "major",
132
+ "spelling_solo": "الدكتور حسن على أستاذ جامعي",
133
+ "spelling_ms": 3114,
134
+ "grammar_solo": "الدكتور حسن علي أستاذ جامعي",
135
+ "grammar_ms": 3415,
136
+ "punctuation_solo": "الدكتور حسن علي أستاذ جامعي.",
137
+ "punctuation_ms": 3948,
138
+ "spelling_verdict": "FP",
139
+ "grammar_verdict": "TN",
140
+ "punctuation_verdict": "FP"
141
+ },
142
+ {
143
+ "id": "E006",
144
+ "dataset": "entities",
145
+ "category": "person",
146
+ "input_text": "السيدة فاطمة الزهراء معلمة",
147
+ "expected": "السيدة فاطمة الزهراء معلمة",
148
+ "severity": "major",
149
+ "spelling_solo": "السيدة فاطمة الزهراء معلمة",
150
+ "spelling_ms": 5634,
151
+ "grammar_solo": "السيدة فاطمة الزهراء معلمة",
152
+ "grammar_ms": 3984,
153
+ "punctuation_solo": "السيدة فاطمة الزهراء معلمة.",
154
+ "punctuation_ms": 4231,
155
+ "spelling_verdict": "TN",
156
+ "grammar_verdict": "TN",
157
+ "punctuation_verdict": "FP"
158
+ },
159
+ {
160
+ "id": "E007",
161
+ "dataset": "entities",
162
+ "category": "person",
163
+ "input_text": "الأستاذ عمر بن الخطاب عادل",
164
+ "expected": "الأستاذ عمر بن الخطاب عادل",
165
+ "severity": "major",
166
+ "spelling_solo": "الأستاذ عمر بن الخطاب عادل",
167
+ "spelling_ms": 4630,
168
+ "grammar_solo": "الأستاذ عمر بن الخطاب عادل",
169
+ "grammar_ms": 5821,
170
+ "punctuation_solo": "الأستاذ عمر بن الخطاب عادل.",
171
+ "punctuation_ms": 4079,
172
+ "spelling_verdict": "TN",
173
+ "grammar_verdict": "TN",
174
+ "punctuation_verdict": "FP"
175
+ },
176
+ {
177
+ "id": "E008",
178
+ "dataset": "entities",
179
+ "category": "person",
180
+ "input_text": "خالد بن الوليد قائد عظيم",
181
+ "expected": "خالد بن الوليد قائد عظيم",
182
+ "severity": "major",
183
+ "spelling_solo": "خالد بن الوليد قائد عظيم",
184
+ "spelling_ms": 4379,
185
+ "grammar_solo": "خالد بن الوليد قائد عظيم",
186
+ "grammar_ms": 4430,
187
+ "punctuation_solo": "خالد بن الوليد قائد عظيم.",
188
+ "punctuation_ms": 4472,
189
+ "spelling_verdict": "TN",
190
+ "grammar_verdict": "TN",
191
+ "punctuation_verdict": "FP"
192
+ },
193
+ {
194
+ "id": "E009",
195
+ "dataset": "entities",
196
+ "category": "person",
197
+ "input_text": "صلاح الدين الأيوبي حرر القدس",
198
+ "expected": "صلاح الدين الأيوبي حرر القدس",
199
+ "severity": "major",
200
+ "spelling_solo": "صلاح الدين الأيوبي حر القدس",
201
+ "spelling_ms": 4345,
202
+ "grammar_solo": "صلاح الدين الأيوبي حرر القدس",
203
+ "grammar_ms": 4691,
204
+ "punctuation_solo": "صلاح الدين الأيوبي حرر القدس.",
205
+ "punctuation_ms": 4084,
206
+ "spelling_verdict": "FP",
207
+ "grammar_verdict": "TN",
208
+ "punctuation_verdict": "FP"
209
+ },
210
+ {
211
+ "id": "E010",
212
+ "dataset": "entities",
213
+ "category": "person",
214
+ "input_text": "ابن سينا عالم عربي مشهور",
215
+ "expected": "ابن سينا عالم عربي مشهور",
216
+ "severity": "major",
217
+ "spelling_solo": "ابن سينا عالم عربي مشهور",
218
+ "spelling_ms": 5819,
219
+ "grammar_solo": "ابن سينا عالم عربي مشهور",
220
+ "grammar_ms": 6752,
221
+ "punctuation_solo": "ابن سينا عالم عربي مشهور.",
222
+ "punctuation_ms": 3932,
223
+ "spelling_verdict": "TN",
224
+ "grammar_verdict": "TN",
225
+ "punctuation_verdict": "FP"
226
+ },
227
+ {
228
+ "id": "E011",
229
+ "dataset": "entities",
230
+ "category": "place",
231
+ "input_text": "جامعة القاهرة من أعرق الجامعات",
232
+ "expected": "جامعة القاهرة من أعرق الجامعات",
233
+ "severity": "major",
234
+ "spelling_solo": "جامعة القاهرة من أعمق الجامعات",
235
+ "spelling_ms": 3997,
236
+ "grammar_solo": "جامعة القاهرة من أعرق الجامعات",
237
+ "grammar_ms": 5990,
238
+ "punctuation_solo": "جامعة القاهرة من أعرق الجامعات.",
239
+ "punctuation_ms": 4690,
240
+ "spelling_verdict": "FP",
241
+ "grammar_verdict": "TN",
242
+ "punctuation_verdict": "FP"
243
+ },
244
+ {
245
+ "id": "E012",
246
+ "dataset": "entities",
247
+ "category": "place",
248
+ "input_text": "مدينة الرياض عاصمة المملكة",
249
+ "expected": "مدينة الرياض عاصمة المملكة",
250
+ "severity": "major",
251
+ "spelling_solo": "مدينة الرياض عاصمة المملكة",
252
+ "spelling_ms": 3736,
253
+ "grammar_solo": "مدينة الرياض عاصمة المملكة",
254
+ "grammar_ms": 4113,
255
+ "punctuation_solo": "مدينة الرياض عاصمة المملكة.",
256
+ "punctuation_ms": 5125,
257
+ "spelling_verdict": "TN",
258
+ "grammar_verdict": "TN",
259
+ "punctuation_verdict": "FP"
260
+ },
261
+ {
262
+ "id": "E013",
263
+ "dataset": "entities",
264
+ "category": "place",
265
+ "input_text": "دبي مدينة عصرية وجميلة",
266
+ "expected": "دبي مدينة عصرية وجميلة",
267
+ "severity": "major",
268
+ "spelling_solo": "دبي مدينة عصرية وجميلة",
269
+ "spelling_ms": 2608,
270
+ "grammar_solo": "دبي مدينة عصرية وجميلة",
271
+ "grammar_ms": 2415,
272
+ "punctuation_solo": "دبي مدينة عصرية وجميلة.",
273
+ "punctuation_ms": 2801,
274
+ "spelling_verdict": "TN",
275
+ "grammar_verdict": "TN",
276
+ "punctuation_verdict": "FP"
277
+ },
278
+ {
279
+ "id": "E014",
280
+ "dataset": "entities",
281
+ "category": "place",
282
+ "input_text": "القدس مدينة مقدسة عند المسلمين",
283
+ "expected": "القدس مدينة مقدسة عند المسلمين",
284
+ "severity": "major",
285
+ "spelling_solo": "القدس مدينة مقدسة عند المسلمين",
286
+ "spelling_ms": 2896,
287
+ "grammar_solo": "القدس مدينة مقدسة عند المسلمين",
288
+ "grammar_ms": 2412,
289
+ "punctuation_solo": "القدس مدينة مقدسة عند المسلمين.",
290
+ "punctuation_ms": 2199,
291
+ "spelling_verdict": "TN",
292
+ "grammar_verdict": "TN",
293
+ "punctuation_verdict": "FP"
294
+ },
295
+ {
296
+ "id": "E015",
297
+ "dataset": "entities",
298
+ "category": "place",
299
+ "input_text": "مكة المكرمة أطهر البقاع",
300
+ "expected": "مكة المكرمة أطهر البقاع",
301
+ "severity": "major",
302
+ "spelling_solo": "مكة المكرمة أطهر البقاع",
303
+ "spelling_ms": 2397,
304
+ "grammar_solo": "مكة المكرمة أطهر البقاع",
305
+ "grammar_ms": 2233,
306
+ "punctuation_solo": "مكة المكرمة أطهر البقاع.",
307
+ "punctuation_ms": 2567,
308
+ "spelling_verdict": "TN",
309
+ "grammar_verdict": "TN",
310
+ "punctuation_verdict": "FP"
311
+ },
312
+ {
313
+ "id": "E016",
314
+ "dataset": "entities",
315
+ "category": "place",
316
+ "input_text": "المدينة المنورة طابة الطيبة",
317
+ "expected": "المدينة المنورة طابة الطيبة",
318
+ "severity": "major",
319
+ "spelling_solo": "المدينة المنورة الطيبة",
320
+ "spelling_ms": 1998,
321
+ "grammar_solo": "المدينة المنورة طابة طيبة",
322
+ "grammar_ms": 2088,
323
+ "punctuation_solo": "المدينة المنورة طابة الطيبة.",
324
+ "punctuation_ms": 2206,
325
+ "spelling_verdict": "FP",
326
+ "grammar_verdict": "FP",
327
+ "punctuation_verdict": "FP"
328
+ },
329
+ {
330
+ "id": "E017",
331
+ "dataset": "entities",
332
+ "category": "place",
333
+ "input_text": "بغداد عاصمة العراق",
334
+ "expected": "بغداد عاصمة العراق",
335
+ "severity": "major",
336
+ "spelling_solo": "بغداد عاصمة العراق",
337
+ "spelling_ms": 2113,
338
+ "grammar_solo": "بغداد عاصمة العراق",
339
+ "grammar_ms": 1857,
340
+ "punctuation_solo": "بغداد عاصمة العراق.",
341
+ "punctuation_ms": 2138,
342
+ "spelling_verdict": "TN",
343
+ "grammar_verdict": "TN",
344
+ "punctuation_verdict": "FP"
345
+ },
346
+ {
347
+ "id": "E018",
348
+ "dataset": "entities",
349
+ "category": "place",
350
+ "input_text": "دمشق أقدم عاصمة في التاريخ",
351
+ "expected": "دمشق أقدم عاصمة في التاريخ",
352
+ "severity": "major",
353
+ "spelling_solo": "دمشق أقدم عاصمة في التاريخ",
354
+ "spelling_ms": 2281,
355
+ "grammar_solo": "دمشق أقدم عاصمة في التاريخ",
356
+ "grammar_ms": 2329,
357
+ "punctuation_solo": "دمشق أقدم عاصمة في التاريخ.",
358
+ "punctuation_ms": 2478,
359
+ "spelling_verdict": "TN",
360
+ "grammar_verdict": "TN",
361
+ "punctuation_verdict": "FP"
362
+ },
363
+ {
364
+ "id": "E019",
365
+ "dataset": "entities",
366
+ "category": "company",
367
+ "input_text": "شركة OpenAI تطور الذكاء الاصطناعي",
368
+ "expected": "شركة OpenAI تطور الذكاء الاصطناعي",
369
+ "severity": "major",
370
+ "spelling_solo": "شركة OpenAI تطور الذكاء الاصطناعي",
371
+ "spelling_ms": 7894,
372
+ "grammar_solo": "شركة OpenAI تطور الذكاء الاصطناعي",
373
+ "grammar_ms": 2409,
374
+ "punctuation_solo": "شركة OpenAI تطور الذكاء الاصطناعي",
375
+ "punctuation_ms": 2268,
376
+ "spelling_verdict": "TN",
377
+ "grammar_verdict": "TN",
378
+ "punctuation_verdict": "TN"
379
+ },
380
+ {
381
+ "id": "E020",
382
+ "dataset": "entities",
383
+ "category": "company",
384
+ "input_text": "شركة Google عملاق التقنية",
385
+ "expected": "شركة Google عملاق التقنية",
386
+ "severity": "major",
387
+ "spelling_solo": "شركة جوجل جوجل عملاق التقنية",
388
+ "spelling_ms": 5865,
389
+ "grammar_solo": "شركة Google عملاق التقنية",
390
+ "grammar_ms": 2176,
391
+ "punctuation_solo": "شركة Google عملاق التقنية.",
392
+ "punctuation_ms": 2034,
393
+ "spelling_verdict": "FP",
394
+ "grammar_verdict": "TN",
395
+ "punctuation_verdict": "FP"
396
+ },
397
+ {
398
+ "id": "E021",
399
+ "dataset": "entities",
400
+ "category": "company",
401
+ "input_text": "شركة Microsoft تنتج البرمجيات",
402
+ "expected": "شركة Microsoft تنتج البرمجيات",
403
+ "severity": "major",
404
+ "spelling_solo": "شركة مايكروسوفت تنتج البرمجيات",
405
+ "spelling_ms": 4482,
406
+ "grammar_solo": "شركة Microsoft تنتج البرمجيات",
407
+ "grammar_ms": 2363,
408
+ "punctuation_solo": "شركة Microsoft تنتج البرمجيات.",
409
+ "punctuation_ms": 2847,
410
+ "spelling_verdict": "FP",
411
+ "grammar_verdict": "TN",
412
+ "punctuation_verdict": "FP"
413
+ },
414
+ {
415
+ "id": "E022",
416
+ "dataset": "entities",
417
+ "category": "company",
418
+ "input_text": "منصة GitHub للمطورين",
419
+ "expected": "منصة GitHub للمطورين",
420
+ "severity": "major",
421
+ "spelling_solo": "منصة GitHub المطورين",
422
+ "spelling_ms": 6268,
423
+ "grammar_solo": "منصة GitHuب للمطورين",
424
+ "grammar_ms": 2435,
425
+ "punctuation_solo": "منصة GitHub للمطورين.",
426
+ "punctuation_ms": 2379,
427
+ "spelling_verdict": "FP",
428
+ "grammar_verdict": "FP",
429
+ "punctuation_verdict": "FP"
430
+ },
431
+ {
432
+ "id": "E023",
433
+ "dataset": "entities",
434
+ "category": "company",
435
+ "input_text": "شركة Tesla للسيارات الكهربائية",
436
+ "expected": "شركة Tesla للسيارات الكهربائية",
437
+ "severity": "major",
438
+ "spelling_solo": "شركة تي اس لا للسيارات الكهربائية",
439
+ "spelling_ms": 6245,
440
+ "grammar_solo": "شركة Teسla للسيارات الكهربائية",
441
+ "grammar_ms": 2639,
442
+ "punctuation_solo": "شركة Tesla للسيارات الكهربائية.",
443
+ "punctuation_ms": 2648,
444
+ "spelling_verdict": "FP",
445
+ "grammar_verdict": "FP",
446
+ "punctuation_verdict": "FP"
447
+ },
448
+ {
449
+ "id": "E024",
450
+ "dataset": "entities",
451
+ "category": "tech",
452
+ "input_text": "أستخدم Python في البرمجة",
453
+ "expected": "أستخدم Python في البرمجة",
454
+ "severity": "major",
455
+ "spelling_solo": "أستخدم Python في البرمجة",
456
+ "spelling_ms": 6228,
457
+ "grammar_solo": "أستخدمت Python في البرمجة",
458
+ "grammar_ms": 2287,
459
+ "punctuation_solo": "أستخدم Python في البرمجة؟",
460
+ "punctuation_ms": 2277,
461
+ "spelling_verdict": "TN",
462
+ "grammar_verdict": "FP",
463
+ "punctuation_verdict": "FP"
464
+ },
465
+ {
466
+ "id": "E025",
467
+ "dataset": "entities",
468
+ "category": "tech",
469
+ "input_text": "إطار TensorFlow مفيد للتعلم",
470
+ "expected": "إطار TensorFlow مفيد للتعلم",
471
+ "severity": "major",
472
+ "spelling_solo": "إطار TensorFlow مفيد للتعلم",
473
+ "spelling_ms": 6426,
474
+ "grammar_solo": "إطار TensorFlow مفيد للتعلم",
475
+ "grammar_ms": 2480,
476
+ "punctuation_solo": "إطار TensorFlow، مفيد: للتعلم",
477
+ "punctuation_ms": 2703,
478
+ "spelling_verdict": "TN",
479
+ "grammar_verdict": "TN",
480
+ "punctuation_verdict": "FP"
481
+ },
482
+ {
483
+ "id": "E026",
484
+ "dataset": "entities",
485
+ "category": "tech",
486
+ "input_text": "مكتبة PyTorch للتعلم العميق",
487
+ "expected": "مكتبة PyTorch للتعلم العميق",
488
+ "severity": "major",
489
+ "spelling_solo": "مكتبة PyTorch للتعلم العميق",
490
+ "spelling_ms": 5846,
491
+ "grammar_solo": "مكتبة PyTorch للتعلم العميق",
492
+ "grammar_ms": 2369,
493
+ "punctuation_solo": "مكتبة PyTorch للتعلم العميق.",
494
+ "punctuation_ms": 2808,
495
+ "spelling_verdict": "TN",
496
+ "grammar_verdict": "TN",
497
+ "punctuation_verdict": "FP"
498
+ },
499
+ {
500
+ "id": "E027",
501
+ "dataset": "entities",
502
+ "category": "tech",
503
+ "input_text": "منصة Node.js للخوادم",
504
+ "expected": "منصة Node.js للخوادم",
505
+ "severity": "major",
506
+ "spelling_solo": "منصة Node. js للخوادم",
507
+ "spelling_ms": 5623,
508
+ "grammar_solo": "منصة Node ، jة للخوادم",
509
+ "grammar_ms": 2873,
510
+ "punctuation_solo": "منصة Node. js للخوادم:",
511
+ "punctuation_ms": 824,
512
+ "spelling_verdict": "FP",
513
+ "grammar_verdict": "FP",
514
+ "punctuation_verdict": "FP"
515
+ },
516
+ {
517
+ "id": "E028",
518
+ "dataset": "entities",
519
+ "category": "tech",
520
+ "input_text": "لغة JavaScript للويب",
521
+ "expected": "لغة JavaScript للويب",
522
+ "severity": "major",
523
+ "spelling_solo": "لغة JavaScript الويب",
524
+ "spelling_ms": 4824,
525
+ "grammar_solo": "لغة JavaScript للويب",
526
+ "grammar_ms": 800,
527
+ "punctuation_solo": "لغة JavaScript: للويب",
528
+ "punctuation_ms": 896,
529
+ "spelling_verdict": "FP",
530
+ "grammar_verdict": "TN",
531
+ "punctuation_verdict": "FP"
532
+ },
533
+ {
534
+ "id": "E029",
535
+ "dataset": "entities",
536
+ "category": "tech",
537
+ "input_text": "قاعدة بيانات MongoDB جيدة",
538
+ "expected": "قاعدة بيانات MongoDB جيدة",
539
+ "severity": "major",
540
+ "spelling_solo": "قاعدة بيانات MongoDB جيدة",
541
+ "spelling_ms": 4214,
542
+ "grammar_solo": "قاعدة بيانات MongoDB جيدة",
543
+ "grammar_ms": 935,
544
+ "punctuation_solo": "قاعدة بيانات MongoDB. جيدة",
545
+ "punctuation_ms": 801,
546
+ "spelling_verdict": "TN",
547
+ "grammar_verdict": "TN",
548
+ "punctuation_verdict": "FP"
549
+ },
550
+ {
551
+ "id": "E030",
552
+ "dataset": "entities",
553
+ "category": "tech",
554
+ "input_text": "خدمة Docker للحاويات",
555
+ "expected": "خدمة Docker للحاويات",
556
+ "severity": "major",
557
+ "spelling_solo": "خدمة Docker للحاويات",
558
+ "spelling_ms": 3841,
559
+ "grammar_solo": "خدمة Docker للحاويات",
560
+ "grammar_ms": 941,
561
+ "punctuation_solo": "خدمة Docker للحاويات.",
562
+ "punctuation_ms": 732,
563
+ "spelling_verdict": "TN",
564
+ "grammar_verdict": "TN",
565
+ "punctuation_verdict": "FP"
566
+ }
567
+ ]
568
+ }
tests/v2/reports/level3_integrated_results.json ADDED
@@ -0,0 +1,1306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "timestamp": "2026-06-23T18:54:52Z",
3
+ "target": "https://bayan10-bayan-api.hf.space",
4
+ "analysis": {
5
+ "total": 80,
6
+ "aggregate": {
7
+ "TP": 22,
8
+ "TN": 0,
9
+ "FP": 58,
10
+ "FN": 0,
11
+ "pass_rate": 0.275
12
+ },
13
+ "by_dataset": {
14
+ "spelling": {
15
+ "TP": 22,
16
+ "TN": 0,
17
+ "FP": 58,
18
+ "FN": 0,
19
+ "total": 80,
20
+ "pass_rate": 0.275
21
+ }
22
+ }
23
+ },
24
+ "results": [
25
+ {
26
+ "id": "S001",
27
+ "dataset": "spelling",
28
+ "category": "hamza",
29
+ "input_text": "انا طالب في الجامعة",
30
+ "expected": "أنا طالب في الجامعة",
31
+ "severity": "major",
32
+ "pipeline_corrected": "أنا طالب في الجامعة.",
33
+ "pipeline_suggestions": 2,
34
+ "pipeline_ms": 8033,
35
+ "spelling_ms": 3645,
36
+ "grammar_ms": 670,
37
+ "punctuation_ms": 2748,
38
+ "verdict": "FP",
39
+ "detail": "Wrong correction"
40
+ },
41
+ {
42
+ "id": "S002",
43
+ "dataset": "spelling",
44
+ "category": "hamza",
45
+ "input_text": "اذا جاء الربيع تزهر الأشجار",
46
+ "expected": "إذا جاء الربيع تزهر الأشجار",
47
+ "severity": "major",
48
+ "pipeline_corrected": "إذا جاء الربيع تزهر الأشجار.",
49
+ "pipeline_suggestions": 2,
50
+ "pipeline_ms": 5444,
51
+ "spelling_ms": 3501,
52
+ "grammar_ms": 586,
53
+ "punctuation_ms": 522,
54
+ "verdict": "FP",
55
+ "detail": "Wrong correction"
56
+ },
57
+ {
58
+ "id": "S003",
59
+ "dataset": "spelling",
60
+ "category": "hamza",
61
+ "input_text": "ايضا هذا الأمر مهم جداً",
62
+ "expected": "أيضاً هذا الأمر مهم جداً",
63
+ "severity": "major",
64
+ "pipeline_corrected": "ايضا هذا الأمر مهم جداً.",
65
+ "pipeline_suggestions": 1,
66
+ "pipeline_ms": 5593,
67
+ "spelling_ms": 3361,
68
+ "grammar_ms": 654,
69
+ "punctuation_ms": 664,
70
+ "verdict": "FP",
71
+ "detail": "Wrong correction"
72
+ },
73
+ {
74
+ "id": "S004",
75
+ "dataset": "spelling",
76
+ "category": "hamza",
77
+ "input_text": "لان الأمر يتعلق بالمستقبل",
78
+ "expected": "لأن الأمر يتعلق بالمستقبل",
79
+ "severity": "major",
80
+ "pipeline_corrected": "لأن الأمر يتعلق بالمستقبل.",
81
+ "pipeline_suggestions": 2,
82
+ "pipeline_ms": 5150,
83
+ "spelling_ms": 3364,
84
+ "grammar_ms": 494,
85
+ "punctuation_ms": 569,
86
+ "verdict": "FP",
87
+ "detail": "Wrong correction"
88
+ },
89
+ {
90
+ "id": "S005",
91
+ "dataset": "spelling",
92
+ "category": "hamza",
93
+ "input_text": "اين ذهبت أمس",
94
+ "expected": "أين ذهبت أمس",
95
+ "severity": "major",
96
+ "pipeline_corrected": "أين ذهبت أمس؟",
97
+ "pipeline_suggestions": 2,
98
+ "pipeline_ms": 3457,
99
+ "spelling_ms": 1889,
100
+ "grammar_ms": 436,
101
+ "punctuation_ms": 338,
102
+ "verdict": "FP",
103
+ "detail": "Wrong correction"
104
+ },
105
+ {
106
+ "id": "S006",
107
+ "dataset": "spelling",
108
+ "category": "hamza",
109
+ "input_text": "اول مرة أزور هذا المكان",
110
+ "expected": "أول مرة أزور هذا المكان",
111
+ "severity": "major",
112
+ "pipeline_corrected": "اول مرة أزور هذا المكان.",
113
+ "pipeline_suggestions": 1,
114
+ "pipeline_ms": 5318,
115
+ "spelling_ms": 3370,
116
+ "grammar_ms": 655,
117
+ "punctuation_ms": 558,
118
+ "verdict": "FP",
119
+ "detail": "Wrong correction"
120
+ },
121
+ {
122
+ "id": "S007",
123
+ "dataset": "spelling",
124
+ "category": "hamza",
125
+ "input_text": "هذا او ذاك لا فرق",
126
+ "expected": "هذا أو ذاك لا فرق",
127
+ "severity": "major",
128
+ "pipeline_corrected": "هذا أو ذاك لا فرق.",
129
+ "pipeline_suggestions": 2,
130
+ "pipeline_ms": 6027,
131
+ "spelling_ms": 4153,
132
+ "grammar_ms": 604,
133
+ "punctuation_ms": 701,
134
+ "verdict": "FP",
135
+ "detail": "Wrong correction"
136
+ },
137
+ {
138
+ "id": "S008",
139
+ "dataset": "spelling",
140
+ "category": "hamza",
141
+ "input_text": "اكبر مدينة في العالم",
142
+ "expected": "أكبر مدينة في العالم",
143
+ "severity": "major",
144
+ "pipeline_corrected": "أكبر مدينة في العالم؟",
145
+ "pipeline_suggestions": 2,
146
+ "pipeline_ms": 8374,
147
+ "spelling_ms": 4040,
148
+ "grammar_ms": 610,
149
+ "punctuation_ms": 2543,
150
+ "verdict": "FP",
151
+ "detail": "Wrong correction"
152
+ },
153
+ {
154
+ "id": "S009",
155
+ "dataset": "spelling",
156
+ "category": "hamza",
157
+ "input_text": "اصغر طالب في الصف",
158
+ "expected": "أصغر طالب في الصف",
159
+ "severity": "major",
160
+ "pipeline_corrected": "أصغر طالب في الصف؟",
161
+ "pipeline_suggestions": 2,
162
+ "pipeline_ms": 4214,
163
+ "spelling_ms": 2207,
164
+ "grammar_ms": 595,
165
+ "punctuation_ms": 513,
166
+ "verdict": "FP",
167
+ "detail": "Wrong correction"
168
+ },
169
+ {
170
+ "id": "S010",
171
+ "dataset": "spelling",
172
+ "category": "hamza",
173
+ "input_text": "ابناء الوطن يعملون بجد",
174
+ "expected": "أبناء الوطن يعملون بجد",
175
+ "severity": "major",
176
+ "pipeline_corrected": "أبناء الوطن يعملون بجد.",
177
+ "pipeline_suggestions": 2,
178
+ "pipeline_ms": 4294,
179
+ "spelling_ms": 2184,
180
+ "grammar_ms": 699,
181
+ "punctuation_ms": 620,
182
+ "verdict": "FP",
183
+ "detail": "Wrong correction"
184
+ },
185
+ {
186
+ "id": "S011",
187
+ "dataset": "spelling",
188
+ "category": "hamza",
189
+ "input_text": "اطفال المدرسة يلعبون",
190
+ "expected": "أطفال المدرسة يلعبون",
191
+ "severity": "major",
192
+ "pipeline_corrected": "أطفال المدرسة يلعبون.",
193
+ "pipeline_suggestions": 2,
194
+ "pipeline_ms": 4345,
195
+ "spelling_ms": 2268,
196
+ "grammar_ms": 542,
197
+ "punctuation_ms": 567,
198
+ "verdict": "FP",
199
+ "detail": "Wrong correction"
200
+ },
201
+ {
202
+ "id": "S012",
203
+ "dataset": "spelling",
204
+ "category": "hamza",
205
+ "input_text": "اخيراً وصلنا إلى الهدف",
206
+ "expected": "أخيراً وصلنا إلى الهدف",
207
+ "severity": "major",
208
+ "pipeline_corrected": "أخيراً وصلنا إلى الهدف.",
209
+ "pipeline_suggestions": 2,
210
+ "pipeline_ms": 6255,
211
+ "spelling_ms": 4085,
212
+ "grammar_ms": 596,
213
+ "punctuation_ms": 729,
214
+ "verdict": "FP",
215
+ "detail": "Wrong correction"
216
+ },
217
+ {
218
+ "id": "S013",
219
+ "dataset": "spelling",
220
+ "category": "hamza",
221
+ "input_text": "وقف امام المدرسة",
222
+ "expected": "وقف أمام المدرسة",
223
+ "severity": "major",
224
+ "pipeline_corrected": "وقف أمام المدرسة.",
225
+ "pipeline_suggestions": 2,
226
+ "pipeline_ms": 2917,
227
+ "spelling_ms": 1380,
228
+ "grammar_ms": 441,
229
+ "punctuation_ms": 481,
230
+ "verdict": "FP",
231
+ "detail": "Wrong correction"
232
+ },
233
+ {
234
+ "id": "S014",
235
+ "dataset": "spelling",
236
+ "category": "hamza",
237
+ "input_text": "انت طالب مجتهد",
238
+ "expected": "أنت طالب مجتهد",
239
+ "severity": "major",
240
+ "pipeline_corrected": "أنت طالب مجتهد.",
241
+ "pipeline_suggestions": 2,
242
+ "pipeline_ms": 3440,
243
+ "spelling_ms": 1755,
244
+ "grammar_ms": 535,
245
+ "punctuation_ms": 337,
246
+ "verdict": "FP",
247
+ "detail": "Wrong correction"
248
+ },
249
+ {
250
+ "id": "S015",
251
+ "dataset": "spelling",
252
+ "category": "hamza",
253
+ "input_text": "اننا نحب الوطن",
254
+ "expected": "إننا نحب الوطن",
255
+ "severity": "major",
256
+ "pipeline_corrected": "اننا نحب الوطن.",
257
+ "pipeline_suggestions": 1,
258
+ "pipeline_ms": 4129,
259
+ "spelling_ms": 2441,
260
+ "grammar_ms": 440,
261
+ "punctuation_ms": 463,
262
+ "verdict": "FP",
263
+ "detail": "Wrong correction"
264
+ },
265
+ {
266
+ "id": "S016",
267
+ "dataset": "spelling",
268
+ "category": "hamza",
269
+ "input_text": "ان شاء الله سنفوز",
270
+ "expected": "إن شاء الله سنفوز",
271
+ "severity": "major",
272
+ "pipeline_corrected": "إن شاء الله سنفوز.",
273
+ "pipeline_suggestions": 2,
274
+ "pipeline_ms": 5342,
275
+ "spelling_ms": 3569,
276
+ "grammar_ms": 636,
277
+ "punctuation_ms": 533,
278
+ "verdict": "FP",
279
+ "detail": "Wrong correction"
280
+ },
281
+ {
282
+ "id": "S017",
283
+ "dataset": "spelling",
284
+ "category": "hamza",
285
+ "input_text": "اقترب الموعد النهائي",
286
+ "expected": "اقترب الموعد النهائي",
287
+ "severity": "none",
288
+ "pipeline_corrected": "اقترب الموعد النهائي.",
289
+ "pipeline_suggestions": 1,
290
+ "pipeline_ms": 4093,
291
+ "spelling_ms": 1957,
292
+ "grammar_ms": 754,
293
+ "punctuation_ms": 584,
294
+ "verdict": "FP",
295
+ "detail": "Modified correct text"
296
+ },
297
+ {
298
+ "id": "S018",
299
+ "dataset": "spelling",
300
+ "category": "hamza",
301
+ "input_text": "ارسل الرسالة فوراً",
302
+ "expected": "أرسل الرسالة فوراً",
303
+ "severity": "major",
304
+ "pipeline_corrected": "أرسل الرسالة فوراً.",
305
+ "pipeline_suggestions": 2,
306
+ "pipeline_ms": 4064,
307
+ "spelling_ms": 2103,
308
+ "grammar_ms": 651,
309
+ "punctuation_ms": 518,
310
+ "verdict": "FP",
311
+ "detail": "Wrong correction"
312
+ },
313
+ {
314
+ "id": "S019",
315
+ "dataset": "spelling",
316
+ "category": "hamza",
317
+ "input_text": "اخر الأخبار في المساء",
318
+ "expected": "آخر الأخبار في المساء",
319
+ "severity": "major",
320
+ "pipeline_corrected": "آخر الأخبار في المساء.",
321
+ "pipeline_suggestions": 2,
322
+ "pipeline_ms": 4463,
323
+ "spelling_ms": 2236,
324
+ "grammar_ms": 549,
325
+ "punctuation_ms": 721,
326
+ "verdict": "FP",
327
+ "detail": "Wrong correction"
328
+ },
329
+ {
330
+ "id": "S020",
331
+ "dataset": "spelling",
332
+ "category": "hamza",
333
+ "input_text": "اسرع في المشي قليلاً",
334
+ "expected": "أسرع في المشي قليلاً",
335
+ "severity": "major",
336
+ "pipeline_corrected": "أسرع في المشي قليلاً!",
337
+ "pipeline_suggestions": 2,
338
+ "pipeline_ms": 6099,
339
+ "spelling_ms": 3801,
340
+ "grammar_ms": 705,
341
+ "punctuation_ms": 588,
342
+ "verdict": "FP",
343
+ "detail": "Wrong correction"
344
+ },
345
+ {
346
+ "id": "S021",
347
+ "dataset": "spelling",
348
+ "category": "hamza",
349
+ "input_text": "اجمل مكان في العالم",
350
+ "expected": "أجمل مكان في العالم",
351
+ "severity": "major",
352
+ "pipeline_corrected": "أجمل مكان في العالم؟",
353
+ "pipeline_suggestions": 2,
354
+ "pipeline_ms": 4010,
355
+ "spelling_ms": 2218,
356
+ "grammar_ms": 540,
357
+ "punctuation_ms": 408,
358
+ "verdict": "FP",
359
+ "detail": "Wrong correction"
360
+ },
361
+ {
362
+ "id": "S022",
363
+ "dataset": "spelling",
364
+ "category": "hamza",
365
+ "input_text": "اعلن الرئيس عن القرار",
366
+ "expected": "أعلن الرئيس عن القرار",
367
+ "severity": "major",
368
+ "pipeline_corrected": "اعلن الرئيس عن القرار.",
369
+ "pipeline_suggestions": 1,
370
+ "pipeline_ms": 4267,
371
+ "spelling_ms": 2265,
372
+ "grammar_ms": 497,
373
+ "punctuation_ms": 598,
374
+ "verdict": "FP",
375
+ "detail": "Wrong correction"
376
+ },
377
+ {
378
+ "id": "S023",
379
+ "dataset": "spelling",
380
+ "category": "hamza",
381
+ "input_text": "اكد الوزير على الخطة",
382
+ "expected": "أكد الوزير على الخطة",
383
+ "severity": "major",
384
+ "pipeline_corrected": "أكد الوزير على الخطة.",
385
+ "pipeline_suggestions": 2,
386
+ "pipeline_ms": 4566,
387
+ "spelling_ms": 2472,
388
+ "grammar_ms": 554,
389
+ "punctuation_ms": 519,
390
+ "verdict": "FP",
391
+ "detail": "Wrong correction"
392
+ },
393
+ {
394
+ "id": "S024",
395
+ "dataset": "spelling",
396
+ "category": "hamza",
397
+ "input_text": "اشار التقرير إلى ذلك",
398
+ "expected": "أشار التقرير إلى ذلك",
399
+ "severity": "major",
400
+ "pipeline_corrected": "أشار التقرير إلى ذلك.",
401
+ "pipeline_suggestions": 2,
402
+ "pipeline_ms": 4563,
403
+ "spelling_ms": 2521,
404
+ "grammar_ms": 590,
405
+ "punctuation_ms": 568,
406
+ "verdict": "FP",
407
+ "detail": "Wrong correction"
408
+ },
409
+ {
410
+ "id": "S025",
411
+ "dataset": "spelling",
412
+ "category": "hamza",
413
+ "input_text": "اعتقد انه سيحضر غداً",
414
+ "expected": "أعتقد أنه سيحضر غداً",
415
+ "severity": "major",
416
+ "pipeline_corrected": "أعتقد انه سيحضر غداً.",
417
+ "pipeline_suggestions": 2,
418
+ "pipeline_ms": 4144,
419
+ "spelling_ms": 2119,
420
+ "grammar_ms": 652,
421
+ "punctuation_ms": 578,
422
+ "verdict": "FP",
423
+ "detail": "Wrong correction"
424
+ },
425
+ {
426
+ "id": "S026",
427
+ "dataset": "spelling",
428
+ "category": "hamza_prefix",
429
+ "input_text": "والاسعار مرتفعة جداً",
430
+ "expected": "والأسعار مرتفعة جداً",
431
+ "severity": "major",
432
+ "pipeline_corrected": "والأسعار مرتفعة جداً.",
433
+ "pipeline_suggestions": 2,
434
+ "pipeline_ms": 4880,
435
+ "spelling_ms": 2705,
436
+ "grammar_ms": 593,
437
+ "punctuation_ms": 585,
438
+ "verdict": "FP",
439
+ "detail": "Wrong correction"
440
+ },
441
+ {
442
+ "id": "S027",
443
+ "dataset": "spelling",
444
+ "category": "hamza_prefix",
445
+ "input_text": "بالاضافة إلى ذلك",
446
+ "expected": "بالإضافة إلى ذلك",
447
+ "severity": "major",
448
+ "pipeline_corrected": "بالإضافة إلى ذلك.",
449
+ "pipeline_suggestions": 2,
450
+ "pipeline_ms": 4101,
451
+ "spelling_ms": 2414,
452
+ "grammar_ms": 438,
453
+ "punctuation_ms": 442,
454
+ "verdict": "FP",
455
+ "detail": "Wrong correction"
456
+ },
457
+ {
458
+ "id": "S028",
459
+ "dataset": "spelling",
460
+ "category": "hamza_prefix",
461
+ "input_text": "فالانسان يحتاج للعلم",
462
+ "expected": "فالإنسان يحتاج للعلم",
463
+ "severity": "major",
464
+ "pipeline_corrected": "فالانسان يحتاج للعلم.",
465
+ "pipeline_suggestions": 1,
466
+ "pipeline_ms": 5749,
467
+ "spelling_ms": 3787,
468
+ "grammar_ms": 484,
469
+ "punctuation_ms": 692,
470
+ "verdict": "FP",
471
+ "detail": "Wrong correction"
472
+ },
473
+ {
474
+ "id": "S029",
475
+ "dataset": "spelling",
476
+ "category": "hamza_prefix",
477
+ "input_text": "كالاطفال في اللعب",
478
+ "expected": "كالأطفال في اللعب",
479
+ "severity": "major",
480
+ "pipeline_corrected": "كلا الأطفال في اللعب.",
481
+ "pipeline_suggestions": 2,
482
+ "pipeline_ms": 6739,
483
+ "spelling_ms": 4640,
484
+ "grammar_ms": 701,
485
+ "punctuation_ms": 540,
486
+ "verdict": "FP",
487
+ "detail": "Wrong correction"
488
+ },
489
+ {
490
+ "id": "S030",
491
+ "dataset": "spelling",
492
+ "category": "hamza_prefix",
493
+ "input_text": "للاسف لم ينجح",
494
+ "expected": "للأسف لم ينجح",
495
+ "severity": "major",
496
+ "pipeline_corrected": "للأسف لم ينجح.",
497
+ "pipeline_suggestions": 2,
498
+ "pipeline_ms": 4198,
499
+ "spelling_ms": 2413,
500
+ "grammar_ms": 437,
501
+ "punctuation_ms": 476,
502
+ "verdict": "FP",
503
+ "detail": "Wrong correction"
504
+ },
505
+ {
506
+ "id": "S031",
507
+ "dataset": "spelling",
508
+ "category": "ta_marbuta",
509
+ "input_text": "المدرسه كبيره وجميله",
510
+ "expected": "المدرسة كبيرة وجميلة",
511
+ "severity": "major",
512
+ "pipeline_corrected": "المدرسة كبيرة وجميلة.",
513
+ "pipeline_suggestions": 3,
514
+ "pipeline_ms": 3680,
515
+ "spelling_ms": 1927,
516
+ "grammar_ms": 494,
517
+ "punctuation_ms": 654,
518
+ "verdict": "TP",
519
+ "detail": "Partial improvement"
520
+ },
521
+ {
522
+ "id": "S032",
523
+ "dataset": "spelling",
524
+ "category": "ta_marbuta",
525
+ "input_text": "الجامعه في القاهره",
526
+ "expected": "الجامعة في القاهرة",
527
+ "severity": "major",
528
+ "pipeline_corrected": "الجامعة في القاهرة.",
529
+ "pipeline_suggestions": 2,
530
+ "pipeline_ms": 6067,
531
+ "spelling_ms": 4080,
532
+ "grammar_ms": 537,
533
+ "punctuation_ms": 527,
534
+ "verdict": "TP",
535
+ "detail": "Partial improvement"
536
+ },
537
+ {
538
+ "id": "S033",
539
+ "dataset": "spelling",
540
+ "category": "ta_marbuta",
541
+ "input_text": "السياره سريعه جداً",
542
+ "expected": "السيارة سريعة جداً",
543
+ "severity": "major",
544
+ "pipeline_corrected": "السيارة سريعة جداً.",
545
+ "pipeline_suggestions": 3,
546
+ "pipeline_ms": 4645,
547
+ "spelling_ms": 2783,
548
+ "grammar_ms": 595,
549
+ "punctuation_ms": 423,
550
+ "verdict": "TP",
551
+ "detail": "Partial improvement"
552
+ },
553
+ {
554
+ "id": "S034",
555
+ "dataset": "spelling",
556
+ "category": "ta_marbuta",
557
+ "input_text": "الشجره طويله وجميله",
558
+ "expected": "الشجرة طويلة وجميلة",
559
+ "severity": "major",
560
+ "pipeline_corrected": "الشجرة طويلة وجميلة.",
561
+ "pipeline_suggestions": 3,
562
+ "pipeline_ms": 3937,
563
+ "spelling_ms": 2031,
564
+ "grammar_ms": 496,
565
+ "punctuation_ms": 519,
566
+ "verdict": "TP",
567
+ "detail": "Partial improvement"
568
+ },
569
+ {
570
+ "id": "S035",
571
+ "dataset": "spelling",
572
+ "category": "ta_marbuta",
573
+ "input_text": "الحياه صعبه في المدينه",
574
+ "expected": "الحياة صعبة في المدينة",
575
+ "severity": "major",
576
+ "pipeline_corrected": "الحياة صعبة في المدينة.",
577
+ "pipeline_suggestions": 3,
578
+ "pipeline_ms": 4159,
579
+ "spelling_ms": 2357,
580
+ "grammar_ms": 535,
581
+ "punctuation_ms": 577,
582
+ "verdict": "TP",
583
+ "detail": "Partial improvement"
584
+ },
585
+ {
586
+ "id": "S036",
587
+ "dataset": "spelling",
588
+ "category": "ta_marbuta",
589
+ "input_text": "المكتبه قريبه من البيت",
590
+ "expected": "المكتبة قريبة من البيت",
591
+ "severity": "major",
592
+ "pipeline_corrected": "المكتبة قريبة من البيت.",
593
+ "pipeline_suggestions": 3,
594
+ "pipeline_ms": 5008,
595
+ "spelling_ms": 3269,
596
+ "grammar_ms": 597,
597
+ "punctuation_ms": 503,
598
+ "verdict": "TP",
599
+ "detail": "Partial improvement"
600
+ },
601
+ {
602
+ "id": "S037",
603
+ "dataset": "spelling",
604
+ "category": "ta_marbuta",
605
+ "input_text": "الغرفه نظيفه ومرتبه",
606
+ "expected": "الغرفة نظيفة ومرتبة",
607
+ "severity": "major",
608
+ "pipeline_corrected": "الغرفة نظيفة ومرتبة.",
609
+ "pipeline_suggestions": 3,
610
+ "pipeline_ms": 2678,
611
+ "spelling_ms": 811,
612
+ "grammar_ms": 653,
613
+ "punctuation_ms": 459,
614
+ "verdict": "TP",
615
+ "detail": "Partial improvement"
616
+ },
617
+ {
618
+ "id": "S038",
619
+ "dataset": "spelling",
620
+ "category": "ta_marbuta",
621
+ "input_text": "القصه مثيره للاهتمام",
622
+ "expected": "القصة مثيرة للاهتمام",
623
+ "severity": "major",
624
+ "pipeline_corrected": "القصة مثيرة للاهتمام!",
625
+ "pipeline_suggestions": 3,
626
+ "pipeline_ms": 2345,
627
+ "spelling_ms": 526,
628
+ "grammar_ms": 536,
629
+ "punctuation_ms": 599,
630
+ "verdict": "TP",
631
+ "detail": "Partial improvement"
632
+ },
633
+ {
634
+ "id": "S039",
635
+ "dataset": "spelling",
636
+ "category": "ta_marbuta",
637
+ "input_text": "الرحله طويله ومتعبه",
638
+ "expected": "الرحلة طويلة ومتعبة",
639
+ "severity": "major",
640
+ "pipeline_corrected": "الرحلة طويلة ومتعبة.",
641
+ "pipeline_suggestions": 3,
642
+ "pipeline_ms": 2842,
643
+ "spelling_ms": 993,
644
+ "grammar_ms": 615,
645
+ "punctuation_ms": 478,
646
+ "verdict": "TP",
647
+ "detail": "Partial improvement"
648
+ },
649
+ {
650
+ "id": "S040",
651
+ "dataset": "spelling",
652
+ "category": "ta_marbuta",
653
+ "input_text": "الوظيفه صعبه لكنها مفيده",
654
+ "expected": "الوظيفة صعبة لكنها مفيدة",
655
+ "severity": "major",
656
+ "pipeline_corrected": "الوظيفة صعبة لكنها مفيدة.",
657
+ "pipeline_suggestions": 3,
658
+ "pipeline_ms": 2828,
659
+ "spelling_ms": 824,
660
+ "grammar_ms": 496,
661
+ "punctuation_ms": 759,
662
+ "verdict": "TP",
663
+ "detail": "Partial improvement"
664
+ },
665
+ {
666
+ "id": "S041",
667
+ "dataset": "spelling",
668
+ "category": "ta_marbuta_prefix",
669
+ "input_text": "بالمدرسه الكبيره",
670
+ "expected": "بالمدرسة الكبيرة",
671
+ "severity": "major",
672
+ "pipeline_corrected": "بالمدرسة الكبيرة",
673
+ "pipeline_suggestions": 2,
674
+ "pipeline_ms": 2387,
675
+ "spelling_ms": 782,
676
+ "grammar_ms": 348,
677
+ "punctuation_ms": 477,
678
+ "verdict": "TP",
679
+ "detail": "Exact match"
680
+ },
681
+ {
682
+ "id": "S042",
683
+ "dataset": "spelling",
684
+ "category": "ta_marbuta_prefix",
685
+ "input_text": "والجامعه المصريه",
686
+ "expected": "والجامعة المصرية",
687
+ "severity": "major",
688
+ "pipeline_corrected": "والجامعة المصرية",
689
+ "pipeline_suggestions": 2,
690
+ "pipeline_ms": 2143,
691
+ "spelling_ms": 481,
692
+ "grammar_ms": 441,
693
+ "punctuation_ms": 415,
694
+ "verdict": "TP",
695
+ "detail": "Exact match"
696
+ },
697
+ {
698
+ "id": "S043",
699
+ "dataset": "spelling",
700
+ "category": "ta_marbuta_prefix",
701
+ "input_text": "فالسياره الجديده",
702
+ "expected": "فالسيارة الجديدة",
703
+ "severity": "major",
704
+ "pipeline_corrected": "السيارة الجديدة",
705
+ "pipeline_suggestions": 2,
706
+ "pipeline_ms": 2365,
707
+ "spelling_ms": 764,
708
+ "grammar_ms": 336,
709
+ "punctuation_ms": 402,
710
+ "verdict": "TP",
711
+ "detail": "Partial improvement"
712
+ },
713
+ {
714
+ "id": "S044",
715
+ "dataset": "spelling",
716
+ "category": "ta_marbuta_prefix",
717
+ "input_text": "كالمدرسه القديمه",
718
+ "expected": "كالمدرسة القديمة",
719
+ "severity": "major",
720
+ "pipeline_corrected": "كالمدرسه قديمة",
721
+ "pipeline_suggestions": 1,
722
+ "pipeline_ms": 2443,
723
+ "spelling_ms": 706,
724
+ "grammar_ms": 434,
725
+ "punctuation_ms": 407,
726
+ "verdict": "FP",
727
+ "detail": "Wrong correction"
728
+ },
729
+ {
730
+ "id": "S045",
731
+ "dataset": "spelling",
732
+ "category": "ta_marbuta_prefix",
733
+ "input_text": "للمدرسه الابتدائيه",
734
+ "expected": "للمدرسة الابتدائية",
735
+ "severity": "major",
736
+ "pipeline_corrected": "للمدرسة الابتدائية",
737
+ "pipeline_suggestions": 2,
738
+ "pipeline_ms": 2449,
739
+ "spelling_ms": 770,
740
+ "grammar_ms": 332,
741
+ "punctuation_ms": 661,
742
+ "verdict": "TP",
743
+ "detail": "Exact match"
744
+ },
745
+ {
746
+ "id": "S046",
747
+ "dataset": "spelling",
748
+ "category": "alif_maqsura",
749
+ "input_text": "ذهبت الي المكتبة",
750
+ "expected": "ذهبت إلى المكتبة",
751
+ "severity": "major",
752
+ "pipeline_corrected": "ذهبت إلى المكتبة؟",
753
+ "pipeline_suggestions": 2,
754
+ "pipeline_ms": 2163,
755
+ "spelling_ms": 492,
756
+ "grammar_ms": 435,
757
+ "punctuation_ms": 434,
758
+ "verdict": "TP",
759
+ "detail": "Partial improvement"
760
+ },
761
+ {
762
+ "id": "S047",
763
+ "dataset": "spelling",
764
+ "category": "alif_maqsura",
765
+ "input_text": "المستشفي الكبير",
766
+ "expected": "المستشفى الكبير",
767
+ "severity": "major",
768
+ "pipeline_corrected": "المستشفى الكبير",
769
+ "pipeline_suggestions": 1,
770
+ "pipeline_ms": 1927,
771
+ "spelling_ms": 514,
772
+ "grammar_ms": 336,
773
+ "punctuation_ms": 436,
774
+ "verdict": "TP",
775
+ "detail": "Exact match"
776
+ },
777
+ {
778
+ "id": "S048",
779
+ "dataset": "spelling",
780
+ "category": "alif_maqsura",
781
+ "input_text": "هدي الطالبة ممتاز",
782
+ "expected": "هدى الطالبة ممتاز",
783
+ "severity": "major",
784
+ "pipeline_corrected": "هدى الطالبة ممتازة",
785
+ "pipeline_suggestions": 2,
786
+ "pipeline_ms": 2224,
787
+ "spelling_ms": 443,
788
+ "grammar_ms": 545,
789
+ "punctuation_ms": 436,
790
+ "verdict": "FP",
791
+ "detail": "Wrong correction"
792
+ },
793
+ {
794
+ "id": "S049",
795
+ "dataset": "spelling",
796
+ "category": "alif_maqsura",
797
+ "input_text": "مصطفي طالب مجتهد",
798
+ "expected": "مصطفى طالب مجتهد",
799
+ "severity": "major",
800
+ "pipeline_corrected": "مصطفى طالب مجتهد.",
801
+ "pipeline_suggestions": 2,
802
+ "pipeline_ms": 2224,
803
+ "spelling_ms": 589,
804
+ "grammar_ms": 534,
805
+ "punctuation_ms": 320,
806
+ "verdict": "FP",
807
+ "detail": "Wrong correction"
808
+ },
809
+ {
810
+ "id": "S050",
811
+ "dataset": "spelling",
812
+ "category": "alif_maqsura",
813
+ "input_text": "موسي نبي عظيم",
814
+ "expected": "موسى نبي عظيم",
815
+ "severity": "major",
816
+ "pipeline_corrected": "موسى نبي عظيم.",
817
+ "pipeline_suggestions": 2,
818
+ "pipeline_ms": 1946,
819
+ "spelling_ms": 521,
820
+ "grammar_ms": 438,
821
+ "punctuation_ms": 318,
822
+ "verdict": "FP",
823
+ "detail": "Wrong correction"
824
+ },
825
+ {
826
+ "id": "S051",
827
+ "dataset": "spelling",
828
+ "category": "alif_maqsura",
829
+ "input_text": "علي يدرس في الكلية",
830
+ "expected": "علي يدرس في الكلية",
831
+ "severity": "none",
832
+ "pipeline_corrected": "علي يدرس في الكلية.",
833
+ "pipeline_suggestions": 1,
834
+ "pipeline_ms": 2092,
835
+ "spelling_ms": 516,
836
+ "grammar_ms": 540,
837
+ "punctuation_ms": 455,
838
+ "verdict": "FP",
839
+ "detail": "Modified correct text"
840
+ },
841
+ {
842
+ "id": "S052",
843
+ "dataset": "spelling",
844
+ "category": "alif_maqsura",
845
+ "input_text": "ذهب الي السوق",
846
+ "expected": "ذهب إلى السوق",
847
+ "severity": "major",
848
+ "pipeline_corrected": "ذهب إلى السوق.",
849
+ "pipeline_suggestions": 2,
850
+ "pipeline_ms": 2033,
851
+ "spelling_ms": 604,
852
+ "grammar_ms": 408,
853
+ "punctuation_ms": 393,
854
+ "verdict": "TP",
855
+ "detail": "Partial improvement"
856
+ },
857
+ {
858
+ "id": "S053",
859
+ "dataset": "spelling",
860
+ "category": "alif_maqsura",
861
+ "input_text": "بني المبنى الجديد",
862
+ "expected": "بنى المبنى الجديد",
863
+ "severity": "major",
864
+ "pipeline_corrected": "بنى المبنى الجديد.",
865
+ "pipeline_suggestions": 2,
866
+ "pipeline_ms": 2459,
867
+ "spelling_ms": 635,
868
+ "grammar_ms": 436,
869
+ "punctuation_ms": 513,
870
+ "verdict": "FP",
871
+ "detail": "Wrong correction"
872
+ },
873
+ {
874
+ "id": "S054",
875
+ "dataset": "spelling",
876
+ "category": "word_split",
877
+ "input_text": "ذهبت فيالبيت",
878
+ "expected": "ذهبت في البيت",
879
+ "severity": "major",
880
+ "pipeline_corrected": "ذهبت في البيت",
881
+ "pipeline_suggestions": 1,
882
+ "pipeline_ms": 2495,
883
+ "spelling_ms": 836,
884
+ "grammar_ms": 424,
885
+ "punctuation_ms": 490,
886
+ "verdict": "TP",
887
+ "detail": "Exact match"
888
+ },
889
+ {
890
+ "id": "S055",
891
+ "dataset": "spelling",
892
+ "category": "word_split",
893
+ "input_text": "خرج منالمدرسة",
894
+ "expected": "خرج من المدرسة",
895
+ "severity": "major",
896
+ "pipeline_corrected": "خرج منالمدرسة.",
897
+ "pipeline_suggestions": 1,
898
+ "pipeline_ms": 2287,
899
+ "spelling_ms": 611,
900
+ "grammar_ms": 395,
901
+ "punctuation_ms": 552,
902
+ "verdict": "FP",
903
+ "detail": "Wrong correction"
904
+ },
905
+ {
906
+ "id": "S056",
907
+ "dataset": "spelling",
908
+ "category": "word_split",
909
+ "input_text": "بقي عندالباب",
910
+ "expected": "بقي عند الباب",
911
+ "severity": "major",
912
+ "pipeline_corrected": "بقي عندالباب.",
913
+ "pipeline_suggestions": 1,
914
+ "pipeline_ms": 7894,
915
+ "spelling_ms": 682,
916
+ "grammar_ms": 468,
917
+ "punctuation_ms": 408,
918
+ "verdict": "FP",
919
+ "detail": "Wrong correction"
920
+ },
921
+ {
922
+ "id": "S057",
923
+ "dataset": "spelling",
924
+ "category": "word_split",
925
+ "input_text": "جلس عندالنافذة",
926
+ "expected": "جلس عند النافذة",
927
+ "severity": "major",
928
+ "pipeline_corrected": "جلس عندالنافذة.",
929
+ "pipeline_suggestions": 1,
930
+ "pipeline_ms": 2314,
931
+ "spelling_ms": 540,
932
+ "grammar_ms": 488,
933
+ "punctuation_ms": 435,
934
+ "verdict": "FP",
935
+ "detail": "Wrong correction"
936
+ },
937
+ {
938
+ "id": "S058",
939
+ "dataset": "spelling",
940
+ "category": "word_split",
941
+ "input_text": "رجع الىالبيت",
942
+ "expected": "رجع إلى البيت",
943
+ "severity": "major",
944
+ "pipeline_corrected": "رجع الىالبيت.",
945
+ "pipeline_suggestions": 1,
946
+ "pipeline_ms": 2280,
947
+ "spelling_ms": 659,
948
+ "grammar_ms": 437,
949
+ "punctuation_ms": 380,
950
+ "verdict": "FP",
951
+ "detail": "Wrong correction"
952
+ },
953
+ {
954
+ "id": "S059",
955
+ "dataset": "spelling",
956
+ "category": "word_split",
957
+ "input_text": "خرج منالباب الخلفي",
958
+ "expected": "خرج من الباب الخلفي",
959
+ "severity": "major",
960
+ "pipeline_corrected": "خرج من الباب الخلفي.",
961
+ "pipeline_suggestions": 2,
962
+ "pipeline_ms": 5938,
963
+ "spelling_ms": 512,
964
+ "grammar_ms": 487,
965
+ "punctuation_ms": 554,
966
+ "verdict": "FP",
967
+ "detail": "Wrong correction"
968
+ },
969
+ {
970
+ "id": "S060",
971
+ "dataset": "spelling",
972
+ "category": "word_split",
973
+ "input_text": "نظر الىالسماء",
974
+ "expected": "نظر إلى السماء",
975
+ "severity": "major",
976
+ "pipeline_corrected": "نظر الىالسماء.",
977
+ "pipeline_suggestions": 1,
978
+ "pipeline_ms": 2092,
979
+ "spelling_ms": 653,
980
+ "grammar_ms": 484,
981
+ "punctuation_ms": 327,
982
+ "verdict": "FP",
983
+ "detail": "Wrong correction"
984
+ },
985
+ {
986
+ "id": "S061",
987
+ "dataset": "spelling",
988
+ "category": "correct_text",
989
+ "input_text": "أنا ذهبت إلى الجامعة",
990
+ "expected": "أنا ذهبت إلى الجامعة",
991
+ "severity": "none",
992
+ "pipeline_corrected": "أنا ذهبت إلى الجامعة.",
993
+ "pipeline_suggestions": 1,
994
+ "pipeline_ms": 2067,
995
+ "spelling_ms": 563,
996
+ "grammar_ms": 487,
997
+ "punctuation_ms": 449,
998
+ "verdict": "FP",
999
+ "detail": "Modified correct text"
1000
+ },
1001
+ {
1002
+ "id": "S062",
1003
+ "dataset": "spelling",
1004
+ "category": "correct_text",
1005
+ "input_text": "هذه المدرسة جميلة جداً",
1006
+ "expected": "هذه المدرسة جميلة جداً",
1007
+ "severity": "none",
1008
+ "pipeline_corrected": "هذه المدرسة جميلة جداً.",
1009
+ "pipeline_suggestions": 1,
1010
+ "pipeline_ms": 4721,
1011
+ "spelling_ms": 500,
1012
+ "grammar_ms": 694,
1013
+ "punctuation_ms": 532,
1014
+ "verdict": "FP",
1015
+ "detail": "Modified correct text"
1016
+ },
1017
+ {
1018
+ "id": "S063",
1019
+ "dataset": "spelling",
1020
+ "category": "correct_text",
1021
+ "input_text": "كان الجو ممطراً اليوم",
1022
+ "expected": "كان الجو ممطراً اليوم",
1023
+ "severity": "none",
1024
+ "pipeline_corrected": "كان الجو ممطراً اليوم؟",
1025
+ "pipeline_suggestions": 1,
1026
+ "pipeline_ms": 2771,
1027
+ "spelling_ms": 823,
1028
+ "grammar_ms": 738,
1029
+ "punctuation_ms": 585,
1030
+ "verdict": "FP",
1031
+ "detail": "Modified correct text"
1032
+ },
1033
+ {
1034
+ "id": "S064",
1035
+ "dataset": "spelling",
1036
+ "category": "correct_text",
1037
+ "input_text": "وكان أحمد في المنزل",
1038
+ "expected": "وكان أحمد في المنزل",
1039
+ "severity": "none",
1040
+ "pipeline_corrected": "وكان أحمد في المنزل.",
1041
+ "pipeline_suggestions": 1,
1042
+ "pipeline_ms": 2497,
1043
+ "spelling_ms": 614,
1044
+ "grammar_ms": 499,
1045
+ "punctuation_ms": 659,
1046
+ "verdict": "FP",
1047
+ "detail": "Modified correct text"
1048
+ },
1049
+ {
1050
+ "id": "S065",
1051
+ "dataset": "spelling",
1052
+ "category": "correct_text",
1053
+ "input_text": "إلى اللقاء يا صديقي",
1054
+ "expected": "إلى اللقاء يا صديقي",
1055
+ "severity": "none",
1056
+ "pipeline_corrected": "إلى اللقاء يا صديقي.",
1057
+ "pipeline_suggestions": 1,
1058
+ "pipeline_ms": 6038,
1059
+ "spelling_ms": 665,
1060
+ "grammar_ms": 484,
1061
+ "punctuation_ms": 440,
1062
+ "verdict": "FP",
1063
+ "detail": "Modified correct text"
1064
+ },
1065
+ {
1066
+ "id": "S066",
1067
+ "dataset": "spelling",
1068
+ "category": "correct_text",
1069
+ "input_text": "ذلك الكتاب مفيد جداً",
1070
+ "expected": "ذلك الكتاب مفيد جداً",
1071
+ "severity": "none",
1072
+ "pipeline_corrected": "ذلك الكتاب مفيد جداً.",
1073
+ "pipeline_suggestions": 1,
1074
+ "pipeline_ms": 2372,
1075
+ "spelling_ms": 502,
1076
+ "grammar_ms": 589,
1077
+ "punctuation_ms": 411,
1078
+ "verdict": "FP",
1079
+ "detail": "Modified correct text"
1080
+ },
1081
+ {
1082
+ "id": "S067",
1083
+ "dataset": "spelling",
1084
+ "category": "correct_text",
1085
+ "input_text": "لكن الأمر صعب علينا",
1086
+ "expected": "لكن الأمر صعب علينا",
1087
+ "severity": "none",
1088
+ "pipeline_corrected": "لكن الأمر صعب علينا.",
1089
+ "pipeline_suggestions": 1,
1090
+ "pipeline_ms": 2401,
1091
+ "spelling_ms": 617,
1092
+ "grammar_ms": 485,
1093
+ "punctuation_ms": 424,
1094
+ "verdict": "FP",
1095
+ "detail": "Modified correct text"
1096
+ },
1097
+ {
1098
+ "id": "S068",
1099
+ "dataset": "spelling",
1100
+ "category": "correct_text",
1101
+ "input_text": "هذا أو ذاك سواء عندي",
1102
+ "expected": "هذا أو ذاك سواء عندي",
1103
+ "severity": "none",
1104
+ "pipeline_corrected": "هذا أو ذاك سواء عندي.",
1105
+ "pipeline_suggestions": 1,
1106
+ "pipeline_ms": 6476,
1107
+ "spelling_ms": 636,
1108
+ "grammar_ms": 683,
1109
+ "punctuation_ms": 435,
1110
+ "verdict": "FP",
1111
+ "detail": "Modified correct text"
1112
+ },
1113
+ {
1114
+ "id": "S069",
1115
+ "dataset": "spelling",
1116
+ "category": "correct_text",
1117
+ "input_text": "الطالب المجتهد ينجح دائماً",
1118
+ "expected": "الطالب المجتهد ينجح دا��ماً",
1119
+ "severity": "none",
1120
+ "pipeline_corrected": "الطالب المجتهد ينجح دائماً.",
1121
+ "pipeline_suggestions": 1,
1122
+ "pipeline_ms": 2658,
1123
+ "spelling_ms": 548,
1124
+ "grammar_ms": 645,
1125
+ "punctuation_ms": 579,
1126
+ "verdict": "FP",
1127
+ "detail": "Modified correct text"
1128
+ },
1129
+ {
1130
+ "id": "S070",
1131
+ "dataset": "spelling",
1132
+ "category": "correct_text",
1133
+ "input_text": "العلم نور والجهل ظلام",
1134
+ "expected": "العلم نور والجهل ظلام",
1135
+ "severity": "none",
1136
+ "pipeline_corrected": "العلم نور والجهل ظلام.",
1137
+ "pipeline_suggestions": 1,
1138
+ "pipeline_ms": 2694,
1139
+ "spelling_ms": 608,
1140
+ "grammar_ms": 726,
1141
+ "punctuation_ms": 582,
1142
+ "verdict": "FP",
1143
+ "detail": "Modified correct text"
1144
+ },
1145
+ {
1146
+ "id": "S071",
1147
+ "dataset": "spelling",
1148
+ "category": "correct_text",
1149
+ "input_text": "أحب القراءة والكتابة",
1150
+ "expected": "أحب القراءة والكتابة",
1151
+ "severity": "none",
1152
+ "pipeline_corrected": "أحب القراءة والكتابة.",
1153
+ "pipeline_suggestions": 1,
1154
+ "pipeline_ms": 5967,
1155
+ "spelling_ms": 627,
1156
+ "grammar_ms": 437,
1157
+ "punctuation_ms": 485,
1158
+ "verdict": "FP",
1159
+ "detail": "Modified correct text"
1160
+ },
1161
+ {
1162
+ "id": "S072",
1163
+ "dataset": "spelling",
1164
+ "category": "correct_text",
1165
+ "input_text": "المعلم يشرح الدرس",
1166
+ "expected": "المعلم يشرح الدرس",
1167
+ "severity": "none",
1168
+ "pipeline_corrected": "المعلم يشرح الدرس.",
1169
+ "pipeline_suggestions": 1,
1170
+ "pipeline_ms": 2178,
1171
+ "spelling_ms": 549,
1172
+ "grammar_ms": 431,
1173
+ "punctuation_ms": 466,
1174
+ "verdict": "FP",
1175
+ "detail": "Modified correct text"
1176
+ },
1177
+ {
1178
+ "id": "S073",
1179
+ "dataset": "spelling",
1180
+ "category": "correct_text",
1181
+ "input_text": "ذهبت إلى السوق واشتريت خبزاً",
1182
+ "expected": "ذهبت إلى السوق واشتريت خبزاً",
1183
+ "severity": "none",
1184
+ "pipeline_corrected": "ذهبت إلى السوق واشتريت خبزاً.",
1185
+ "pipeline_suggestions": 1,
1186
+ "pipeline_ms": 3214,
1187
+ "spelling_ms": 720,
1188
+ "grammar_ms": 837,
1189
+ "punctuation_ms": 828,
1190
+ "verdict": "FP",
1191
+ "detail": "Modified correct text"
1192
+ },
1193
+ {
1194
+ "id": "S074",
1195
+ "dataset": "spelling",
1196
+ "category": "correct_text",
1197
+ "input_text": "الطقس جميل في الربيع",
1198
+ "expected": "الطقس جميل في الربيع",
1199
+ "severity": "none",
1200
+ "pipeline_corrected": "الطقس جميل في الربيع.",
1201
+ "pipeline_suggestions": 1,
1202
+ "pipeline_ms": 5596,
1203
+ "spelling_ms": 497,
1204
+ "grammar_ms": 637,
1205
+ "punctuation_ms": 424,
1206
+ "verdict": "FP",
1207
+ "detail": "Modified correct text"
1208
+ },
1209
+ {
1210
+ "id": "S075",
1211
+ "dataset": "spelling",
1212
+ "category": "correct_text",
1213
+ "input_text": "نحن نعمل بجد كل يوم",
1214
+ "expected": "نحن نعمل بجد كل يوم",
1215
+ "severity": "none",
1216
+ "pipeline_corrected": "نحن نعمل بجد كل يوم.",
1217
+ "pipeline_suggestions": 1,
1218
+ "pipeline_ms": 2688,
1219
+ "spelling_ms": 619,
1220
+ "grammar_ms": 785,
1221
+ "punctuation_ms": 360,
1222
+ "verdict": "FP",
1223
+ "detail": "Modified correct text"
1224
+ },
1225
+ {
1226
+ "id": "S076",
1227
+ "dataset": "spelling",
1228
+ "category": "multi_error",
1229
+ "input_text": "انا ذهبت الي المدرسه",
1230
+ "expected": "أنا ذهبت إلى المدرسة",
1231
+ "severity": "critical",
1232
+ "pipeline_corrected": "أنا ذهبت إلى المدرسة.",
1233
+ "pipeline_suggestions": 3,
1234
+ "pipeline_ms": 2497,
1235
+ "spelling_ms": 630,
1236
+ "grammar_ms": 485,
1237
+ "punctuation_ms": 442,
1238
+ "verdict": "TP",
1239
+ "detail": "Partial improvement"
1240
+ },
1241
+ {
1242
+ "id": "S077",
1243
+ "dataset": "spelling",
1244
+ "category": "multi_error",
1245
+ "input_text": "ايضا الجامعه كبيره",
1246
+ "expected": "أيضاً الجامعة كبيرة",
1247
+ "severity": "critical",
1248
+ "pipeline_corrected": "أيضا الجامعة كبيرة.",
1249
+ "pipeline_suggestions": 2,
1250
+ "pipeline_ms": 5834,
1251
+ "spelling_ms": 557,
1252
+ "grammar_ms": 582,
1253
+ "punctuation_ms": 406,
1254
+ "verdict": "TP",
1255
+ "detail": "Partial improvement"
1256
+ },
1257
+ {
1258
+ "id": "S078",
1259
+ "dataset": "spelling",
1260
+ "category": "multi_error",
1261
+ "input_text": "لان المدرسه بعيده جداً",
1262
+ "expected": "لأن المدرسة بعيدة جداً",
1263
+ "severity": "critical",
1264
+ "pipeline_corrected": "لأن المدرسة بعيدة جداً.",
1265
+ "pipeline_suggestions": 4,
1266
+ "pipeline_ms": 2671,
1267
+ "spelling_ms": 669,
1268
+ "grammar_ms": 648,
1269
+ "punctuation_ms": 531,
1270
+ "verdict": "TP",
1271
+ "detail": "Partial improvement"
1272
+ },
1273
+ {
1274
+ "id": "S079",
1275
+ "dataset": "spelling",
1276
+ "category": "multi_error",
1277
+ "input_text": "اين الجامعه الكبيره",
1278
+ "expected": "أين الجامعة الكبيرة",
1279
+ "severity": "critical",
1280
+ "pipeline_corrected": "اين أن الجامعة الكبيرة",
1281
+ "pipeline_suggestions": 2,
1282
+ "pipeline_ms": 2619,
1283
+ "spelling_ms": 710,
1284
+ "grammar_ms": 493,
1285
+ "punctuation_ms": 456,
1286
+ "verdict": "FP",
1287
+ "detail": "Wrong correction"
1288
+ },
1289
+ {
1290
+ "id": "S080",
1291
+ "dataset": "spelling",
1292
+ "category": "multi_error",
1293
+ "input_text": "اول مره ازور المكتبه",
1294
+ "expected": "أول مرة أزور المكتبة",
1295
+ "severity": "critical",
1296
+ "pipeline_corrected": "أول مرة أزور المكتبة.",
1297
+ "pipeline_suggestions": 4,
1298
+ "pipeline_ms": 5759,
1299
+ "spelling_ms": 799,
1300
+ "grammar_ms": 513,
1301
+ "punctuation_ms": 483,
1302
+ "verdict": "TP",
1303
+ "detail": "Partial improvement"
1304
+ }
1305
+ ]
1306
+ }
tests/v2/test_level2_solo.py CHANGED
@@ -106,22 +106,29 @@ def classify_result(input_text, output_text, expected_text, dataset):
106
  # For correction tests
107
  needs_correction = (inp_n != exp_n)
108
 
 
 
 
 
109
  if needs_correction:
110
  if text_changed:
111
- # Check if output matches expected (or is closer to expected)
112
- if out_n == exp_n:
113
  return "TP" # Perfect correction
114
- elif _edit_distance(out_n, exp_n) < _edit_distance(inp_n, exp_n):
115
  return "TP" # Partial but improving correction
 
 
116
  else:
117
  return "FP" # Changed but not in right direction
118
  else:
119
  return "FN" # Should have corrected but didn't
120
  else:
121
- if text_changed:
122
- return "FP" # Changed text that was already correct
123
- else:
124
  return "TN" # Correctly left unchanged
 
 
 
 
125
 
126
 
127
  def _edit_distance(a, b):
 
106
  # For correction tests
107
  needs_correction = (inp_n != exp_n)
108
 
109
+ # Strip trailing punctuation from output for comparison
110
+ _TERMINAL_PUNCT = '.،؛؟!?!'
111
+ out_stripped = out_n.rstrip(_TERMINAL_PUNCT).rstrip()
112
+
113
  if needs_correction:
114
  if text_changed:
115
+ if out_n == exp_n or out_stripped == exp_n:
 
116
  return "TP" # Perfect correction
117
+ elif _edit_distance(out_stripped, exp_n) < _edit_distance(inp_n, exp_n):
118
  return "TP" # Partial but improving correction
119
+ elif _edit_distance(out_n, exp_n) < _edit_distance(inp_n, exp_n):
120
+ return "TP" # Improving (with punct)
121
  else:
122
  return "FP" # Changed but not in right direction
123
  else:
124
  return "FN" # Should have corrected but didn't
125
  else:
126
+ if not text_changed:
 
 
127
  return "TN" # Correctly left unchanged
128
+ elif out_stripped == inp_n:
129
+ return "TN" # Only punctuation added
130
+ else:
131
+ return "FP" # Changed text that was already correct
132
 
133
 
134
  def _edit_distance(a, b):
tests/v2/test_level3_integrated.py CHANGED
@@ -115,11 +115,18 @@ def classify_pipeline(input_text, corrected_text, expected_text, dataset, entity
115
  # Correction dataset
116
  needs_correction = (inp_n != exp_n)
117
 
 
 
 
 
 
118
  if needs_correction:
119
- if out_n == exp_n:
120
  return "TP", "Exact match"
121
- elif text_changed and _closer(out_n, inp_n, exp_n):
122
  return "TP", "Partial improvement"
 
 
123
  elif not text_changed:
124
  return "FN", "No correction applied"
125
  else:
@@ -127,6 +134,9 @@ def classify_pipeline(input_text, corrected_text, expected_text, dataset, entity
127
  else:
128
  if not text_changed:
129
  return "TN", "Correctly unchanged"
 
 
 
130
  else:
131
  return "FP", f"Modified correct text"
132
 
 
115
  # Correction dataset
116
  needs_correction = (inp_n != exp_n)
117
 
118
+ # Strip trailing punctuation from output for comparison
119
+ # Pipeline may add . or ؟ via PuncAra even when the correction is correct
120
+ _TERMINAL_PUNCT = '.،؛؟!?!'
121
+ out_stripped = out_n.rstrip(_TERMINAL_PUNCT).rstrip()
122
+
123
  if needs_correction:
124
+ if out_n == exp_n or out_stripped == exp_n:
125
  return "TP", "Exact match"
126
+ elif text_changed and _closer(out_stripped, inp_n, exp_n):
127
  return "TP", "Partial improvement"
128
+ elif text_changed and _closer(out_n, inp_n, exp_n):
129
+ return "TP", "Partial improvement (with punct)"
130
  elif not text_changed:
131
  return "FN", "No correction applied"
132
  else:
 
134
  else:
135
  if not text_changed:
136
  return "TN", "Correctly unchanged"
137
+ elif out_stripped == inp_n:
138
+ # Only punctuation was added — count as TN for correction datasets
139
+ return "TN", "Only punctuation added"
140
  else:
141
  return "FP", f"Modified correct text"
142