File size: 8,161 Bytes
918deb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
{
  "timestamp": "2026-06-20T19:33:59.110768+00:00",
  "gap1_drift": {
    "word_count": 187,
    "char_count": 1104,
    "total_suggestions": 0,
    "front_half": 0,
    "back_half": 0,
    "coordinate_mismatches": [],
    "a_spelling_changed": true,
    "a_grammar_changed": true,
    "a_punc_changed": true,
    "suggestions": []
  },
  "gap2_priority": [
    {
      "id": "G2-01",
      "input": "الطلاب اجتهدو في الامتحان",
      "desc": "اجتهدو — spelling should add ا, grammar may do different fix. Grammar wins (priority 3 > 1)",
      "a_spelling": "الطلاب اجتهدو في الامتحان",
      "a_grammar": "الطلاب اجتهدو في الامتحان",
      "a_punctuation": "الطلاب اجتهدو في الامتحان.",
      "b_corrected": "الطلاب اجتهد في الامتحين",
      "b_suggestions": [
        {
          "alternatives": [],
          "confidence": 1.0,
          "correction": "الامتحين",
          "end": 25,
          "id": "502647e7-18fd-41d2-b1c7-2978a3ee7704",
          "locked": true,
          "original": "الامتحان",
          "priority": 3,
          "start": 17,
          "type": "grammar"
        },
        {
          "alternatives": [
            "اجتهد",
            "اجتهدو"
          ],
          "confidence": 0.9,
          "correction": "اجتهد",
          "end": 13,
          "id": "0a93f071-af36-4219-b6f5-d11e748c4601",
          "locked": true,
          "original": "اجتهدو",
          "priority": 1,
          "start": 7,
          "type": "spelling"
        }
      ]
    },
    {
      "id": "G2-02",
      "input": "البنات ذهبو الى البيت",
      "desc": "ذهبو — spelling could give ذهبوا, grammar could give ذهبن (fem). Grammar wins.",
      "a_spelling": "البنات ذهبو إلى البيت",
      "a_grammar": "البنات ذهبن الى البيت",
      "a_punctuation": "البنات ذهبو الى البيت.",
      "b_corrected": "البنات ذهبن إلى البيت.",
      "b_suggestions": [
        {
          "alternatives": [],
          "confidence": 1.0,
          "correction": "ذهبن",
          "end": 11,
          "id": "0f00a9ab-1166-4e4d-8dd7-ae6dba1f9f1e",
          "locked": true,
          "original": "ذهبو",
          "priority": 3,
          "start": 7,
          "type": "grammar"
        },
        {
          "alternatives": [],
          "confidence": 0.8,
          "correction": "البيت.",
          "end": 21,
          "id": "af3a0a21-5e1e-45f5-a1ad-9c3730b4ab25",
          "locked": true,
          "original": "البيت",
          "priority": 2,
          "start": 16,
          "type": "punctuation"
        },
        {
          "alternatives": [
            "إلى",
            "ال",
            "الم",
            "الى"
          ],
          "confidence": 0.9,
          "correction": "إلى",
          "end": 15,
          "id": "1b7096dc-6043-4e1a-9de3-d59204327b86",
          "locked": true,
          "original": "الى",
          "priority": 1,
          "start": 12,
          "type": "spelling"
        }
      ]
    },
    {
      "id": "G2-03",
      "input": "وفجأه سقطت الكتب",
      "desc": "وفجأه — spelling may fix ه→ة; punctuation may want comma after it. Overlap?",
      "a_spelling": "وفجأه سقطت الكتب",
      "a_grammar": "وفجأة سقطت الكتب",
      "a_punctuation": "وفجأه سقطت الكتب.",
      "b_corrected": "وفجأة سقطت الكتب.",
      "b_suggestions": [
        {
          "alternatives": [],
          "confidence": 0.8,
          "correction": "الكتب.",
          "end": 16,
          "id": "fc257e46-4368-4d32-acb0-de5b6d461aaf",
          "locked": true,
          "original": "الكتب",
          "priority": 2,
          "start": 11,
          "type": "punctuation"
        },
        {
          "alternatives": [],
          "confidence": 1.0,
          "correction": "وفجأة",
          "end": 5,
          "id": "7397e7e6-e238-4ed4-a184-461f576a74f6",
          "locked": true,
          "original": "وفجأه",
          "priority": 1,
          "start": 0,
          "type": "spelling"
        }
      ]
    }
  ],
  "gap3_dropped": {
    "tests": [
      {
        "input": "الطلاب الذين اجتهدو في دراستهم حققو نتائج ممتازه في الامتحانات",
        "a_spell_diffs": [
          {
            "word_idx": 2,
            "original": "اجتهدو",
            "corrected": "اجتهد"
          },
          {
            "word_idx": 5,
            "original": "حققو",
            "corrected": "حقوق"
          }
        ],
        "a_gram_diffs": [
          {
            "word_idx": 5,
            "original": "حققو",
            "corrected": "حققوا"
          },
          {
            "word_idx": 7,
            "original": "ممتازه",
            "corrected": "ممتازة"
          }
        ],
        "a_punc_diffs": [
          {
            "word_idx": 9,
            "original": "الامتحانات",
            "corrected": "الامتحانات."
          }
        ],
        "b_suggestion_count": 4,
        "dropped_spell": [],
        "dropped_gram": [],
        "dropped_punc": []
      }
    ]
  },
  "gap4_rare": {
    "tests": [
      {
        "id": "R-01",
        "input": "استوقفني المشهد فتأملته مليا",
        "domain": "literary",
        "output": "استوقفني المشهد فتأملتة مليا",
        "changed": true
      },
      {
        "id": "R-02",
        "input": "تستأثر القوى العظمى بالنفوذ الدولي",
        "domain": "political_literary",
        "output": "تستأثر القوى العظمى بالنفوذ الدولي",
        "changed": false
      },
      {
        "id": "R-03",
        "input": "استقطب المؤتمر ثلة من العلماء الأفذاذ",
        "domain": "formal_rare",
        "output": "استقطب المؤتمر ثلة من العلماء الأفذاذ",
        "changed": false
      },
      {
        "id": "R-04",
        "input": "يتسنى للمرء أن يستشف الحقيقة من بين السطور",
        "domain": "literary_verb",
        "output": "يتسنى للمرء أن يكتشف الحقيقة من بين السطور",
        "changed": true
      },
      {
        "id": "R-05",
        "input": "ألقى المحاضر خطبة عصماء استحوذت على إعجاب الحاضرين",
        "domain": "oratory",
        "output": "ألقى المحاضر خطبة علماء استحوذت على إعجاب الحاضرين",
        "changed": true
      },
      {
        "id": "R-06",
        "input": "تمخض الاجتماع عن قرارات مصيرية",
        "domain": "formal_verb",
        "output": "تمخض الاجتماع عن قرارات مصيرية",
        "changed": false
      },
      {
        "id": "R-07",
        "input": "أرهقته المسغبة فاستكان للقدر",
        "domain": "classical",
        "output": "طريقتة المسببة فاستكان القدر",
        "changed": true
      },
      {
        "id": "R-08",
        "input": "نستشرف آفاق المستقبل بثقة واقتدار",
        "domain": "formal_speech",
        "output": "نستشرف آفاق المستقبل بثقة واقتدار",
        "changed": false
      },
      {
        "id": "R-09",
        "input": "اعتراه القلق فتملكه الأرق",
        "domain": "literary_psych",
        "output": "اعتراه القلق فتملكة الأرق",
        "changed": true
      },
      {
        "id": "R-10",
        "input": "استأنف العمل بعد فترة من التقاعس",
        "domain": "formal_verb",
        "output": "استأنف العمل بعد فترة من التقاعد",
        "changed": true
      }
    ],
    "fp_count": 6,
    "total": 10
  }
}