-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathgrammar.xml
More file actions
8113 lines (7677 loc) · 409 KB
/
grammar.xml
File metadata and controls
8113 lines (7677 loc) · 409 KB
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
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
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/print.xsl" ?>
<?xml-stylesheet type="text/css" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.css"
title="Easy editing stylesheet" ?>
<!--
Arabic Grammar and Typo Rules for LanguageTool
See arabic_tags for the meaning of the POS tags
Copyright (C) 2019 Taha Zerrouki (http://www.tahadz.com),
Sohaib Afifi (http://sohaibafifi.com)
and the LanguageTool contributors
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
-->
<!DOCTYPE rules [
<!-- <!ENTITY UserRules SYSTEM "file://user-rules.xml">-->
<!ENTITY apostrophe "['’`´‘]">
<!ENTITY nbsp " ">
<!ENTITY tanwin_fathatan "ً">
<!ENTITY fatha "َ">
<!ENTITY shadda "ّ">
<!ENTITY alef "ا">
<!ENTITY horof_jar "في|من|إلى|على|عن|مع|وفي|ومن|وإلى|وعلى|وعن|ومع">
<!ENTITY unbreak_proclitics "ال">
<!ENTITY proclitics "و|ف|ال|وال|فال|ب|بال|وبال|ك|كال|وكال|فكال|ل|لل|ولل|فلل">
<!ENTITY undef_proclitics "و|ف|ب|ك|وب|فب|وك|فك">
<!ENTITY verb_prefixes "ي|ت|ن|أ|سي|ست|سن|سأ">
<!ENTITY verb6_prefixes "ا|ي|ت|ن|أ|سي|ست|سن|سأ">
<!ENTITY conj "و|ف">
<!ENTITY prep "ب|ك|ل">
<!ENTITY enclitics "|ه|ها|هما|هم|هن|ك|كما|كم|كن|ي|نا">
<!ENTITY verb_enclitics "ه|ها|هما|هم|هن|ك|كما|كم|كن|ني|نا">
<!ENTITY forms_3an "عن|عني|عنا|عنك|عنكما|عنكم|عنكن|عنه|عنها|عنهما|عنهم|عنهن">
<!ENTITY forms_3anh "عني|عنا|عنك|عنكما|عنكم|عنكن|عنه|عنها|عنهما|عنهم|عنهن">
<!ENTITY forms_ila "إلى|إلي|إلينا|إليك|إليكما|إليكم|إليكن|إليه|إليها|إليهما|إليهم|إليهن">
<!ENTITY forms_ilayh "إلي|إلينا|إليك|إليكما|إليكم|إليكن|إليه|إليها|إليهما|إليهم|إليهن">
<!ENTITY forms_3ala "على|علي|علينا|عليك|عليكما|عليكم|عليكن|عليه|عليها|عليهما|عليهم|عليهن">
<!ENTITY forms_3alayh "علينا|عليك|عليكما|عليكم|عليكن|عليه|عليها|عليهما|عليهم|عليهن">
<!ENTITY forms_fi "في|فينا|فيك|فيكما|فيكم|فيكن|فيه|فيها|فيهما|فيهم|فيهن">
<!ENTITY forms_fih "فينا|فيك|فيكما|فيكم|فيكن|فيه|فيها|فيهما|فيهم|فيهن">
<!ENTITY forms_hawla "حول|حولنا|حولك|حولكما|حولكم|حولكن|حوله|حولها|حولهما|حولهم|حولهن">
<!ENTITY forms_hawlah "حولنا|حولك|حولكما|حولكم|حولكن|حوله|حولها|حولهما|حولهم|حولهن">
<!ENTITY forms_min "مني|من|مننا|منك|منكما|منكم|منكن|منه|منها|منهما|منهم|منهن">
<!ENTITY forms_minh "مني|مننا|منك|منكما|منكم|منكن|منه|منها|منهما|منهم|منهن">
<!ENTITY forms_ma3a "مع|معنا|معك|معكما|معكم|معكن|معه|معها|معهما|معهم|معهن">
<!ENTITY forms_ma3ah "معنا|معك|معكما|معكم|معكن|معه|معها|معهما|معهم|معهن">
<!ENTITY forms_bih "بي|بنا|بك|بكما|بكم|بكن|به|بها|بهما|بهم|بهن">
<!ENTITY forms_lih "لي|لنا|لك|لكما|لكم|لكن|له|لها|لهما|لهم|لهن">
<!ENTITY forms_anna "أني|أننا|أنك|أنكما|أنكم|أنكن|أنه|أنها|أنهما|أنهم|أنهن">
<!ENTITY forms_inna "إني|إننا|إنك|إنكما|إنكم|إنكن|إنه|إنها|إنهما|إنهم|إنهن">
<!ENTITY forms_3inda "عند|عندنا|عندك|عندكما|عندكم|عندكن|عنده|عندها|عندهما|عندهم|عندهن">
<!ENTITY forms_3indah "عندنا|عندك|عندكما|عندكم|عندكن|عنده|عندها|عندهما|عندهم|عندهن">
<!ENTITY forms_dhidda "ضد|ضدنا|ضدك|ضدكما|ضدكم|ضدكن|ضده|ضدها|ضدهما|ضدهم|ضدهن">
<!ENTITY forms_dhiddah "ضدنا|ضدك|ضدكما|ضدكم|ضدكن|ضده|ضدها|ضدهما|ضدهم|ضدهن">
<!ENTITY inna_sisters "إن|كأن|لعل|لكن|ليت|أن">
<!ENTITY allah_names "الآخر|الحميد|الحفيظ|اللطيف|المحيي|الجامع|الباطن|الولي|المقسط|الغفار|الودود|الوهاب|المانع|الشكور|الحليم|المتكبر|الحسيب|الجليل|النافع|الصبور|النور|المصور|الفتاح|مالك|الحي|الغني|الحق|الواسع|الجبار|المغني|العظيم|الباقي|الوارث|الرزاق|المهيمن|الضار|المقيت|الهادي|المتعالي|الوالي|المقتدر|المعز|الأول|القادر|الصمد|السميع|المذل|الكريم|ذو|البصير|العلي|السلام|المميت|العدل|الرافع|التواب|القهار|القابض|المعيد|المبدئ|الرشيد|المؤخر|المؤمن|الجلال|الظاهر|القيوم|الخبير|الوكيل|العزيز|الرحيم|الواجد|البر|المقدم|البديع|الغفور|الرقيب|الأحد|القدوس|الباسط|الجميل|والإكرام|المجيد|الرحمن|الرؤوف|المجيب|القوي|الخالق|الواحد|المنتقم|الملك|المعطي|المحصي|الكبير|العفو|المتين|الباعث|الماجد|الخافض|الحكم|العليم|البارئ|الشهي">
<!ENTITY wrong_feminine "ذقن|رفات">
<!ENTITY wrong_masculine "كتف|فخذ|ساق|ريح|بئر|يمين|ضبع|سن">
<!ENTITY neutral_gender "بعض|من">
<!ENTITY months_solar_syriac "كانون الثاني|شباط|آذار|نيسان|أيار|حزيران|تموز|آب|أيلول|تشرين الأول|تشرين الثاني|كانون الأول">
<!ENTITY months_solar_french "جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر">
<!ENTITY months_solar_english "يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر">
<!ENTITY months_solar_english_french "يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|جانفي|فيفري|أفريل|ماي|جوان|جويلية|أوت|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر">
<!ENTITY months_solar "&months_solar_syriac;|&months_solar_english_french;">
<!ENTITY seasons_years "صيف|ربيع|شتاء|خريف">
<!ENTITY week_days "السبت|الأحد|الإثنين|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|سبت|أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة">
<!ENTITY periods "ساعة|ساعتين|ساعات|يوم|يومين|أيام|ليلة|ليلتين|ليال|شهر|شهرين|شهور|أشهر|عام|عامين|أعوام|فترة|مدة|برهة|دقيقة|دقيقتين|دقائق|أسبوع|أسبوعين|أسابيع|سنوات|سنتين|سنة">
<!ENTITY periods_need_tanwin_nasb "يوم|أيام|شهر|شهور|أشهر|عام|أعوام|أسبوع">
<!ENTITY periods_no_need_tanwin_nasb "ساعة|ساعتين|ساعات|يومين|ليلة|ليلتين|ليال|شهرين|عامين|فترة|مدة|برهة|دقيقة|دقيقتين|دقائق|اسبوعين|أسابيع|سنوات|سنتين|سنة">
<!ENTITY number_units "ثلاث|أربع|خمس|ست|سبع|تسع|ثماني|اثنين|واحد|ثلاثة|أربعة|خمسة|ستة|سبعة|ثمانية|تسعة">
<!ENTITY number_decades_raf3 "عشرون|ثلاثون|أربعون|خمسون|ستون|سبعون|ثمانون|تسعون">
<!ENTITY number_decades_jar "عشرين|ثلاثين|أربعين|خمسين|ستين|سبعين|ثمانين|تسعين">
<!ENTITY number_dual_raf3 "ألفان|مليونان|ملياران|بليونان|مئتان|اثنان|اثنتان|اثنا|اثنتا">
<!ENTITY numeric_words_raf3 "و?(&number_decades_raf3;|&number_dual_raf3;)">
<!ENTITY number_2_99_jar "(&number_units;)|(&number_decades_jar;)|(&number_units;) و(&number_decades_jar;)">
<!ENTITY isolated_pronouns "أنا|أنت|هو|هي|أنتما|هما|نحن|أنتم|أنتن|هم|هن">
]>
<!--suppress ALL -->
<rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
lang="ar"
xsi:noNamespaceSchemaLocation="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.xsd">
<!-- ====================================================================== -->
<!-- Unification -->
<!-- ====================================================================== -->
<unification feature="number">
<equivalence type="single">
<token postag=".*;.?1.*;.*" postag_regexp="yes"/>
</equivalence>
<equivalence type="dual">
<token postag=".*;.?2.*;.*" postag_regexp="yes"/>
</equivalence>
<equivalence type="plural">
<token postag=".*;.?3.*;.*" postag_regexp="yes"/>
</equivalence>
</unification>
<unification feature="gender">
<equivalence type="female">
<token postag=".*;F.*;.*" postag_regexp="yes"/>
</equivalence>
<equivalence type="male">
<token postag=".*;M.*;.*" postag_regexp="yes"/>
</equivalence>
</unification>
<unification feature="case">
<equivalence type="majrour">
<token postag=".*;.?.?I.*" postag_regexp="yes"/>
</equivalence>
<equivalence type="marfou3">
<token postag=".*;.?.?U.*" postag_regexp="yes"/>
</equivalence>
<equivalence type="mansoub">
<token postag=".*;.?.?A.*" postag_regexp="yes"/>
</equivalence>
<equivalence type="majzoum">
<token postag=".*;.?.?0.*" postag_regexp="yes"/>
</equivalence>
</unification>
<unification feature="definite">
<equivalence type="definited">
<token postag=".*;.*;.?.?[L|H]" postag_regexp="yes"/>
</equivalence>
<equivalence type="undefinated">
<token postag=".*;.*;.?.?-" postag_regexp="yes"/>
</equivalence>
</unification>
<!-- ====================================================================== -->
<!-- Gender agreement -->
<!-- ====================================================================== -->
<category id="GENDER_AGREEMENT" name="التطابق في النوع- مذكر ومؤنث" type="grammar">
<rulegroup id="gender_agreement_with_demonstrative_pronouns" name="تطابق النوع مع أسماء الإشارة">
<rule id="gender_0001_hadha" name="تطابق النوع مع هذا">
<pattern>
<marker>
<token inflected="yes">هذا</token>
<token postag="N.*;F1.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ربما عليك وضع اسم اشارة مؤنث: <suggestion><match no="1" regexp_match="هذا" regexp_replace="هذه"/> <match no="2"/></suggestion>
</message>
<example correction="هذه السلامة" type="incorrect"><marker>هذا السلامة</marker></example>
<example correction="وهذه السلامة" type="incorrect"><marker>وهذا السلامة</marker></example>
<example correction="هذه سلامته"><marker>هذا سلامته</marker></example>
<example correction="هذه سلامة" type="incorrect"><marker>هذا سلامة</marker></example>
</rule>
<rule id="gender_0002_hadhihi" name="تطابق النوع مع هذه">
<antipattern>
<token inflected="yes">هذه</token>
<token regexp="yes">&neutral_gender;</token>
</antipattern>
<pattern>
<marker>
<token inflected="yes">هذه</token>
<token postag="N.*;M1.*;--.*" postag_regexp="yes">
<exception postag="N.*;F.*;--.*" postag_regexp="yes"/>
</token>
</marker>
</pattern>
<message>الكلمة "\2" مذكرة، ضع اسم اشارة مذكرًا:
<suggestion><match no="1" regexp_match="هذه" regexp_replace="هذا"/> \2</suggestion>
</message>
<example correction="هذا البطل" type="incorrect"><marker>هذه البطل</marker></example>
<example correction="هذا البطل" type="incorrect"><marker>هذه البطل</marker></example>
</rule>
<rule id="gender_0003_hadha" name="تطابق هذا مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token>هذه</token>
<token regexp="yes" inflected="yes" postag="N.*;.?1.*;--.*" postag_regexp="yes">&wrong_feminine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة: <suggestion><match no="1" regexp_match="هذه" regexp_replace="هذا"/> <match no="2"/></suggestion></message>
<example correction="هذا الذقن"><marker>هذه الذقن</marker>.
</example>
</rule>
<rule id="gender_0004_hadhihi" name="تطابق هذه مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token inflected="yes">هذا</token>
<token regexp="yes" inflected="yes" postag="N.*;.?1.*;--.*" postag_regexp="yes">&wrong_masculine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة:
<suggestion><match no="1" regexp_match="هذا" regexp_replace="هذه"/> <match no="2"/></suggestion></message>
<example correction="هذه الكتف" type="incorrect"><marker>هذا الكتف</marker>.</example>
<example correction="هذه كتفه" type="incorrect"><marker>هذا كتفه</marker>.</example>
<example correction="وهذه الكتف" type="incorrect"><marker>وهذا الكتف</marker>.</example>
</rule>
<rule id="gender_0006_dhalika" name="تطابق النوع مع ذلك">
<pattern>
<marker>
<token inflected="yes">ذلك</token>
<token postag="N.*;F1.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ربما عليك وضع اسم اشارة مؤنث: <suggestion><match no="1" regexp_match="ذلك" regexp_replace="تلك"/> <match no="2"/></suggestion>
</message>
<example correction="تلك السلامة" type="incorrect"><marker>ذلك السلامة</marker></example>
<example correction="وتلك السلامة" type="incorrect"><marker>وذلك السلامة</marker></example>
<example correction="تلك سلامته"><marker>ذلك سلامته</marker></example>
<example correction="تلك سلامة" type="incorrect"><marker>ذلك سلامة</marker></example>
</rule>
<rule id="gender_0007_tilka" name="تطابق النوع مع تلك">
<antipattern>
<token inflected="yes">تلك</token>
<token regexp="yes">&neutral_gender;</token>
</antipattern>
<pattern>
<marker>
<token inflected="yes">تلك</token>
<token postag="N.*;M1.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" مذكرة، ضع اسم اشارة مذكرًا:
<suggestion><match no="1" regexp_match="تلك" regexp_replace="ذلك"/> \2</suggestion>
</message>
<example correction="ذلك السلام" type="incorrect"><marker>تلك السلام</marker></example>
<example correction="ذلك سلام" type="incorrect"><marker>تلك سلام</marker></example>
</rule>
<rule id="gender_0008_dhalika" name="تطابق ذلك مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token>تلك</token>
<token regexp="yes" inflected="yes" postag="N.*;.?1.*;--.*" postag_regexp="yes">&wrong_feminine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة: <suggestion><match no="1" regexp_match="تلك" regexp_replace="ذلك"/> <match no="2"/></suggestion></message>
<example correction="ذلك الذقن"><marker>تلك الذقن</marker>.
</example>
</rule>
<rule id="gender_0009_tilka" name="تطابق تلك مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token inflected="yes">ذلك</token>
<token regexp="yes" inflected="yes" postag="N.*;.?1.*;--.*" postag_regexp="yes">&wrong_masculine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة:
<suggestion><match no="1" regexp_match="ذلك" regexp_replace="تلك"/> <match no="2"/></suggestion></message>
<example correction="تلك الكتف" type="incorrect"><marker>ذلك الكتف</marker>.</example>
<example correction="تلك كتفه" type="incorrect"><marker>ذلك كتفه</marker>.</example>
<example correction="وتلك الكتف" type="incorrect"><marker>وذلك الكتف</marker>.</example>
</rule>
<rule id="gender_0010_hadhani" name="تطابق النوع مع هذان">
<pattern>
<marker>
<token inflected="yes">هذان</token>
<token postag="N.*;F2U.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ربما عليك وضع اسم اشارة مؤنث: <suggestion><match no="1" regexp_match="هذان" regexp_replace="هاتان"/> <match no="2"/></suggestion>
</message>
<example correction="هاتان البطاقتان" type="incorrect"><marker>هذان البطاقتان</marker></example>
<example correction="وهاتان البطاقتان" type="incorrect"><marker>وهذان البطاقتان</marker></example>
<example correction="هاتان بطاقتاه"><marker>هذان بطاقتاه</marker></example>
<example correction="هاتان بطاقتان" type="incorrect"><marker>هذان بطاقتان</marker></example>
</rule>
<rule id="gender_0011_hatani" name="تطابق النوع مع هاتان">
<pattern>
<marker>
<token inflected="yes">هاتان</token>
<token postag="N.*;M2U.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" مذكرة، ضع اسم اشارة مذكرًا:
<suggestion><match no="1" regexp_match="هاتان" regexp_replace="هذان"/> \2</suggestion>
</message>
<example correction="هذان السلامان" type="incorrect"><marker>هاتان السلامان</marker></example>
<example correction="هذان سلامان" type="incorrect"><marker>هاتان سلامان</marker></example>
</rule>
<rule id="gender_0012_hadhani" name="تطابق هذان مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token>هاتان</token>
<token regexp="yes" inflected="yes" postag="N.*;.?2U.*;--.*" postag_regexp="yes">&wrong_feminine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة: <suggestion><match no="1" regexp_match="هاتان" regexp_replace="هذان"/> <match no="2"/></suggestion></message>
<example correction="هذان الذقنان"><marker>هاتان الذقنان</marker>.
</example>
</rule>
<rule id="gender_0013_hatani" name="تطابق هاتان مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token inflected="yes">هذان</token>
<token regexp="yes" inflected="yes" postag="N.*;.?2U.*;--.*" postag_regexp="yes">&wrong_masculine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة:
<suggestion><match no="1" regexp_match="هذان" regexp_replace="هاتان"/> <match no="2"/></suggestion></message>
<example correction="هاتان الكتفان" type="incorrect"><marker>هذان الكتفان</marker>.</example>
<example correction="هاتان كتفاه" type="incorrect"><marker>هذان كتفاه</marker>.</example>
<example correction="وهاتان الكتفان" type="incorrect"><marker>وهذان الكتفان</marker>.</example>
</rule>
<rule id="gender_0014_hadhayni" name="تطابق النوع مع هذين">
<pattern>
<marker>
<token inflected="yes">هذين</token>
<token postag="N.*;F2[IA].*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ربما عليك وضع اسم اشارة مؤنث: <suggestion><match no="1" regexp_match="هذين" regexp_replace="هاتين"/> <match no="2"/></suggestion>
</message>
<example correction="هاتين البطاقتين" type="incorrect"><marker>هذين البطاقتين</marker></example>
<example correction="وهاتين البطاقتين" type="incorrect"><marker>وهذين البطاقتين</marker></example>
<!-- FIXME: توليد صيغة المثنى المنصوب المتصل بضمير-->
<!-- <example correction="هاتين بطاقتيه"><marker>هذين بطاقتيه</marker></example>-->
<example correction="هاتين بطاقتين" type="incorrect"><marker>هذين بطاقتين</marker></example>
</rule>
<rule id="gender_0015_hatayni" name="تطابق النوع مع هاتين">
<pattern>
<marker>
<token inflected="yes">هاتين</token>
<token postag="N.*;M2[IA].*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" مذكرة، ضع اسم اشارة مذكرًا:
<suggestion><match no="1" regexp_match="هاتين" regexp_replace="هذين"/> \2</suggestion>
</message>
<example correction="هذين السلامين" type="incorrect"><marker>هاتين السلامين</marker></example>
<example correction="هذين سلامين" type="incorrect"><marker>هاتين سلامين</marker></example>
</rule>
<rule id="gender_0016_hadhayni" name="تطابق هذين مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token>هاتين</token>
<token regexp="yes" inflected="yes" postag="N.*;.?2[IA].*;--.*" postag_regexp="yes">&wrong_feminine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة: <suggestion><match no="1" regexp_match="هاتين" regexp_replace="هذين"/> <match no="2"/></suggestion></message>
<example correction="هذين الذقنين"><marker>هاتين الذقنين</marker>.
</example>
</rule>
<rule id="gender_0017_hatayni" name="تطابق هاتين مع الكلمات ملتبسة النوع">
<pattern>
<marker>
<token inflected="yes">هذين</token>
<token regexp="yes" inflected="yes" postag="N.*;.?2[IA].*;--.*" postag_regexp="yes">&wrong_masculine;</token>
</marker>
</pattern>
<message>الكلمة "\2" مؤنثة، ضع اسم اشارة مؤنثة:
<suggestion><match no="1" regexp_match="هذين" regexp_replace="هاتين"/> <match no="2"/></suggestion></message>
<example correction="هاتين الكتفين" type="incorrect"><marker>هذين الكتفين</marker>.</example>
<!-- FIXME: توليد صيغة المثنى المنصوب المتصل بضمير-->
<!-- <example correction="هاتين كتفيه" type="incorrect"><marker>هذين كتفيه</marker>.</example>-->
<example correction="وهاتين الكتفين" type="incorrect"><marker>وهذين الكتفين</marker>.</example>
</rule>
<rule id="gender_0018_hadhani_case" name="تطابق الإعراب مع هذان">
<pattern>
<marker>
<token inflected="yes">هذان</token>
<token postag="N.*;M2[IA].*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" بدل من هذان لذا تتبعه في الإعراب، ربما عليك مراجعة العبارة: <suggestion><match no="1" regexp_match="هذان" regexp_replace="هذين"/> <match no="2"/></suggestion><suggestion><match no="1"/> <match no="2" postag="(N.*;M2)([IA])(.*)" postag_replace="$1U$3" postag_regexp="yes"/></suggestion>
</message>
<example correction="هذين الكتابين|هذان الكتابان" type="incorrect"><marker>هذان الكتابين</marker></example>
<example correction="وهذين الكتابين|وهذان الكتابان" type="incorrect"><marker>وهذان الكتابين</marker></example>
<example correction="هذين كتابين|هذان كتابان" type="incorrect"><marker>هذان كتابين</marker></example>
</rule>
<rule id="gender_0019_hadhani_case" name="تطابق الإعراب مع هذين">
<!-- طبقنا هذه القاعدة تعطي اقتراحين على هذين وهذين فهذين فقط
أمّا "بهذين ولهذين فتعطي حالة واحدة -->
<pattern>
<marker>
<token regexp="yes">(&conj;)?هذين</token>
<token postag="N.*;M2U.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" بدل من هذين لذا تتبعه في الإعراب، ربما عليك مراجعة العبارة: <suggestion><match no="1" regexp_match="هذين" regexp_replace="هذان"/> <match no="2"/></suggestion><suggestion><match no="1"/> <match no="2" postag="(N.*;M2)(U)(.*)" postag_replace="$1A$3" postag_regexp="yes"/></suggestion>
</message>
<example correction="هذان الكتابان|هذين الكتابين" type="incorrect"><marker>هذين الكتابان</marker></example>
<example correction="وهذان الكتابان|وهذين الكتابين" type="incorrect"><marker>وهذين الكتابان</marker></example>
<example correction="هذان كتابان|هذين كتابين" type="incorrect"><marker>هذين كتابان</marker></example>
</rule>
<rule id="gender_0020_hadhani_case" name="تطابق الإعراب مع هذين">
<!-- طبقنا هذه القاعدة تعطي اقتراحين على هذين وهذين فهذين فقط
أمّا "بهذين ولهذين فتعطي حالة واحدة -->
<pattern>
<marker>
<token regexp="yes">(&conj;)?(&prep;)هذين</token>
<token postag="N.*;M2U.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" بدل من هذين لذا تتبعه في الإعراب، ربما عليك مراجعة العبارة: <suggestion><match no="1"/> <match no="2" postag="(N.*;M2)(U)(.*)" postag_replace="$1A$3" postag_regexp="yes"/></suggestion>
</message>
<example correction="بهذين الكتابين" type="incorrect"><marker>بهذين الكتابان</marker></example>
<example correction="وبهذين الكتابين" type="incorrect"><marker>وبهذين الكتابان</marker></example>
<example correction="كهذين كتابين" type="incorrect"><marker>كهذين كتابان</marker></example>
</rule>
<rule id="gender_0021_hatayni_case" name="تطابق الإعراب مع هاتان">
<pattern>
<marker>
<token inflected="yes">هاتان</token>
<token postag="N.*;F2[IA].*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" بدل من هاتان لذا تتبعه في الإعراب، ربما عليك مراجعة العبارة: <suggestion><match no="1" regexp_match="هاتان" regexp_replace="هاتين"/> <match no="2"/></suggestion><suggestion><match no="1"/> <match no="2" postag="(N.*;F2)([IA])(.*)" postag_replace="$1U$3" postag_regexp="yes"/></suggestion>
</message>
<example correction="هاتين البطاقتين|هاتان البطاقتان" type="incorrect"><marker>هاتان البطاقتين</marker></example>
<example correction="وهاتين البطاقتين|وهاتان البطاقتان" type="incorrect"><marker>وهاتان البطاقتين</marker></example>
<example correction="هاتين بطاقتين|هاتان بطاقتان" type="incorrect"><marker>هاتان بطاقتين</marker></example>
</rule>
<rule id="gender_0022_hatayni_case" name="تطابق الإعراب مع هاتين">
<!-- طبقنا هذه القاعدة تعطي اقتراحين على هاتين وهاتين فهاتين فقط
أمّا "بهاتين ولهاتين فتعطي حالة واحدة -->
<pattern>
<marker>
<token regexp="yes">(&conj;)?هاتين</token>
<token postag="N.*;F2U.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" بدل من هاتين لذا تتبعه في الإعراب، ربما عليك مراجعة العبارة: <suggestion><match no="1" regexp_match="هاتين" regexp_replace="هاتان"/> <match no="2"/></suggestion><suggestion><match no="1"/> <match no="2" postag="(N.*;F2)(U)(.*)" postag_replace="$1A$3" postag_regexp="yes"/></suggestion>
</message>
<example correction="هاتان البطاقتان|هاتين البطاقتين" type="incorrect"><marker>هاتين البطاقتان</marker></example>
<example correction="وهاتان البطاقتان|وهاتين البطاقتين" type="incorrect"><marker>وهاتين البطاقتان</marker></example>
<example correction="هاتان بطاقتان|هاتين بطاقتين" type="incorrect"><marker>هاتين بطاقتان</marker></example>
</rule>
<rule id="gender_0023_hatayni_case" name="تطابق الإعراب مع هاتين">
<!-- طبقنا هذه القاعدة تعطي اقتراحين على هاتين وهاتين فهاتين فقط
أمّا "بهاتين ولهاتين فتعطي حالة واحدة -->
<pattern>
<marker>
<token regexp="yes">(&conj;)?(&prep;)هاتين</token>
<token postag="N.*;F2U.*;--.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>الكلمة "\2" بدل من هاتين لذا تتبعه في الإعراب، ربما عليك مراجعة العبارة: <suggestion><match no="1"/> <match no="2" postag="(N.*;F2)(U)(.*)" postag_replace="$1A$3" postag_regexp="yes"/></suggestion>
</message>
<example correction="بهاتين البطاقتين" type="incorrect"><marker>بهاتين البطاقتان</marker></example>
<example correction="وبهاتين البطاقتين" type="incorrect"><marker>وبهاتين البطاقتان</marker></example>
<example correction="كهاتين بطاقتين" type="incorrect"><marker>كهاتين بطاقتان</marker></example>
</rule>
<!-- هذه القاعة متضمنة في القواعد السابقة،
<rule id="gender_0005_Sin" name="هذا السن">
<pattern>
<marker>
<token inflected="yes">هذا</token>
</marker>
<token>السن</token>
</pattern>
<message>أتقصد بالسن:العمر و الجارحة وهي مؤنثة<suggestion>هذه</suggestion>؟
</message>
<example correction="هذه"><marker>هذا</marker>
السن تعبر عن مدى كبر هذا الشيخ
</example>
</rule>
-->
</rulegroup>
<!--
END RULEGROUP gender_agreement_with_demonstrative_pronouns
-->
<rulegroup id="gender_agreement_with_relative_pronouns" name="تطابق النوع مع الأسماء الموصولة">
<rule id="gender_0010_alladhi" name="تطابق النوع مع الذي">
<pattern><marker>
<token postag="N.*;M1.*" postag_regexp="yes"/>
<token>التي</token>
</marker>
</pattern>
<message>هل تقصد <suggestion><match no="1"/> الذي</suggestion>?
</message>
<example correction="القول الذي" type="incorrect"> <marker>القول التي</marker> سمعته </example>
<example correction="الطعام الذي" type="incorrect"> <marker>الطعام التي</marker> جلبناه </example>
</rule>
<rule id="gender_0011_allati" name="تطابق النوع مع التي">
<pattern>
<marker>
<token postag="N.*;F1.*" postag_regexp="yes"/>
<token>الذي</token>
</marker>
</pattern>
<message>هل تقصد <suggestion><match no="1"/> التي</suggestion>?
</message>
<example correction="الوشاية التي" type="incorrect"><marker>الوشاية الذي</marker> سمعتها </example>
<example correction="الكتابة التي" type="incorrect"><marker>الكتابة الذي</marker> جلبناها </example>
</rule>
</rulegroup>
<!--
END RULEGROUP gender_agreement_with_relative_pronouns
-->
<rulegroup id="gender_agreement_with_pronouns" name="تطابق النوع مع الضمير">
<rule id="gender_00" name="هي الأكبر">
<pattern>
<marker>
<token>هي</token>
<token>الأكبر</token>
</marker>
</pattern>
<message>تجب المطابقة في النوع لدخول (أل) على أفعل التفضيل
<suggestion>هي الكبرى</suggestion>
</message>
<example correction="هي الكبرى" type="incorrect"> آسيا <marker>هي الأكبر</marker> بين القارات </example>
<example type="correct"> آسيا هي الكبرى بين القارات </example>
</rule>
</rulegroup>
<!--
END RULEGROUP gender_agreement_with_pronouns
-->
<rulegroup id="gender_agreement_with_adj" name="تطابق المصوف مع الصفة في النوع">
<rule id="gender_0100" name="رجال يقظى">
<pattern>
<marker>
<unify>
<feature id="definite"/>
<!-- <feature id="gender"/> -->
<feature id="case"/>
<!-- <feature id="number"/> -->
<token inflected="yes">رجال</token>
<token inflected="yes" postag="N.*;.*;--.?" postag_regexp="yes">يقظى</token>
</unify>
</marker>
</pattern>
<message>(يَقْظَى) مؤنث (يقظان)، وفي جمعها تقول:(هذه نسوة يِقاظ / يَقاظى)
<suggestion><match no="1"/> <match no="2" regexp_match="يقظى" regexp_replace="يقاظ"/></suggestion>
<suggestion><match no="1"/> <match no="2" regexp_match="يقظى" regexp_replace="أيقاظ"/></suggestion>
</message>
<example correction="رجال يقاظ|رجال أيقاظ" type="incorrect"> هؤلاء <marker>رجال يقظى</marker> </example>
<example type="correct"> هؤلاء رجال يِقاظٌ / أيْقاظٌ </example>
</rule>
<rule id="gender_0101" name="شريعة سمحاء">
<pattern>
<marker>
<token inflected="yes">شريعة</token>
<token inflected="yes" postag="N.*;.*;--.?" postag_regexp="yes">سمحاء</token>
</marker>
</pattern>
<message>(سمحاء) مؤنث (أَسْمَح)، لم تقلهما العرب
<suggestion><match no="1"/> <match no="2" regexp_match="سمحاء" regexp_replace="سَمْحة"/></suggestion>
</message>
<example correction="شريعة سَمْحة" type="incorrect"><marker>شريعة سمحاء</marker> </example>
<example type="correct"> شريعةٌ سَمْحَةٌ </example>
</rule>
<rule id="gender_0102" name="ضبع مفترس">
<pattern>
<marker>
<unify>
<feature id="definite"/>
<!-- <feature id="gender"/> -->
<feature id="case"/>
<!-- <feature id="number"/> -->
<token inflected="yes">ضبع</token>
<token inflected="yes" postag="NA.*;M.*;--.?" postag_regexp="yes">مفترس</token>
</unify>
</marker>
</pattern>
<message>(الضبع) اسمٌ مؤنث
<suggestion><match no="1"/> <match no="2" regexp_match="مفترس" regexp_replace="مفترسة"/></suggestion>
</message>
<example correction="ضبع مفترسة" type="incorrect">
<marker>ضبع مفترس</marker>
</example>
<example type="correct"> ضَبُعٌ مفترسة </example>
</rule>
</rulegroup>
</category>
<!--
END CATEGORY GENDER_AGREEMENT
-->
<!-- ====================================================================== -->
<!-- Common errors-->
<!-- ====================================================================== -->
<category id="COMMON_ERRORS_SYNTAX" name="أخطاء تركيبية" type="grammar">
<rulegroup id="common_errors_syntax" name="أخطاء شائعة">
<rule id="syntax_0000_Qam_bi" name="القيام_ب">
<pattern>
<marker>
<token inflected="yes">قيام</token>
<token postag="NM.*;.*;-B.*" postag_regexp="yes"/>
</marker>
</pattern>
<message>
تعبير "القيام بـ" ركيك يستحسن تجنبه إلى تصريف المصدر الموالي، قل ضربت بدلا من القيام بالضرب.
<suggestion>الفعل من (<match no="2" regexp_match="^ب" regexp_replace=""/>)</suggestion>
<suggestion><match no="2" regexp_match="^ب" regexp_replace=""/></suggestion>
</message>
<example correction="الفعل من (الضرب)|الضرب"> <marker>القيام بالضرب</marker></example>
<!--<example correction="الفعل من (شرب)|شرب" type="incorrect"><marker>قمت بشرب</marker> الماء </example>-->
</rule>
</rulegroup>
<!--
END RULEGROUP common errors syntax
-->
</category>
<!--
END CATEGORY COMMON_ERRORS_SYNTAX
-->
<!-- ====================================================================== -->
<!-- Grammar Errors -->
<!-- ====================================================================== -->
<category id="GRAMMAR_ERROR" name="أخطاء نحوية" type="grammar">
<rulegroup id="VerbalOperator" name="العوامل الداخلة على الأفعال">
<rule id="grammar_0010_jazem_lm" name="حروف الجزم لم">
<antipattern>
<token>لم</token>
<token postag="V..;.*f.0;---" postag_regexp="yes"/>
</antipattern>
<pattern>
<marker>
<token>لم</token>
<token postag="V..;.*f.[^0];---" postag_regexp="yes"/>
</marker>
</pattern>
<message>أتقصد؟
الفعل المضارع بعد "لم" يأتي مجزوما.
<suggestion><match no="1"/> <match no="2" postag="(V..;.*f.).*" postag_replace="$10;---" postag_regexp="yes"/></suggestion>
</message>
<example correction="لم يجر" type="incorrect"><marker>لم يجري</marker></example>
<example correction="لم يستطيعوا" type="incorrect"><marker>لم يستطيعون</marker></example>
</rule>
<!-- grammar_0010_jazem_lamma حروف الجزم لما-->
<rule id="grammar_0010_jazem_lamma" name="حروف الجزم لما">
<antipattern>
<token>لما</token>
<token postag="V..;.*f.0;---" postag_regexp="yes"/>
</antipattern>
<pattern>
<marker>
<token>لما</token>
<token postag="V..;.*f.[^0];---" postag_regexp="yes"/>
</marker>
</pattern>
<message>أتقصد؟
الفعل المضارع بعد "لمّا" يأتي مجزوما. مثل لمّا يدخلْ الإيمان في قلوبكم.
<suggestion>لَمَّا <match no="2" postag="(V..;.*f.).*" postag_replace="$10;---" postag_regexp="yes"/></suggestion>
</message>
<example correction="لَمَّا يجر" type="incorrect"><marker>لما يجري</marker></example>
<example correction="لَمَّا يستطيعوا" type="incorrect"><marker>لما يستطيعون</marker></example>
</rule>
<!-- grammar_0010_jazem_lam_nahia حروف الجزم لا الناهية-->
<rule id="grammar_0010_jazem_la_nahia" name="حروف الجزم لا الناهية">
<antipattern>
<token>لا</token>
<token postag="V..;..Y.f.0;---" postag_regexp="yes"/>
</antipattern>
<pattern>
<marker>
<token>لا</token>
<token postag="V..;..Y.f.[^0];---" postag_regexp="yes"/>
</marker>
</pattern>
<message>
الفعل المضارع بعد "لا الناهية" يأتي مجزوما. أتقصد؟
<suggestion><match no="1"/> <match no="2" postag="(V..;..Y.f.).*" postag_replace="$10;---" postag_regexp="yes"/></suggestion>
</message>
<example type="correct"><marker>لا يجري</marker></example>
<example correction="لا تخافوا" type="incorrect"><marker>لا تخافون</marker></example>
</rule>
<!-- grammar_0011_notjazem_lam_nafia حروف غير جازمة لا النافية-->
<rule id="grammar_0011_notjazem_lam_nafia" name="حروف غير جازمة لا النافية">
<!-- إذا جاء بعد لا، فعل مضارع مجزوم في المخاطب فهي ناهية، -->
<antipattern>
<!-- إذا كان الضمير المسند إليه غير مخاطب، وكان الفعل مجزوما فهو خطأ -->
<token>لا</token>
<token postag="V..;..Y.f.0;---" postag_regexp="yes"/>
</antipattern>
<pattern>
<marker>
<token>لا</token>
<token postag="V..;..[^Y].f.0;---" postag_regexp="yes"/>
</marker>
</pattern>
<message>
الفرق بين لا الناهية ولا النافية، لا الناهية تأتي مع ضمائر المخاطب فقط. لذا فإن لا النافية لا تجزم الفعل المضارع أتقصد؟
<suggestion><match no="1"/> <match no="2" postag="(V..;....f.).*" postag_replace="$1U;---" postag_regexp="yes"/></suggestion>
</message>
<example type="correct"><marker>لا يجري</marker></example>
<example correction="لا يخافون" type="incorrect"><marker>لا يخافوا</marker></example>
<example type="correct">لا تخافوا</example>
</rule>
</rulegroup>
<!--
END RULEGROUP VerbalOperator
-->
</category>
<!--
END CATEGORY GRAMMAR ERROR
-->
<!-- ====================================================================== -->
<!-- Syntax Common errors-->
<!-- ====================================================================== -->
<category id="SYNTAX_COMMON_ERRORS" name="أخطاء تركيبية" type="grammar">
<rulegroup id="common_collocations" name="متلازمات شائعة">
<rule id="collo_0008_uqsim_ban" name="أقسم بأن">
<pattern>
<marker>
<token inflected="yes">أَقْسَمَ</token>
<token>بأن</token>
</marker>
</pattern>
<message>الباء تدخل على المُقْسَم به
<suggestion><match no="1"/> باللّهِ أنْ</suggestion>
<suggestion><match no="1"/> أنْ</suggestion>
</message>
<example correction="أقسم باللّهِ أنْ|أقسم أنْ" type="incorrect"><marker>أقسم بأن</marker> يفعل كذا </example>
<example correction="أقسمت باللّهِ أنْ|أقسمت أنْ" type="incorrect"><marker>أقسمت بأن</marker> يفعل كذا </example>
<example type="correct"> أَقْسَمَ (باللّهِ) أنْ يَفعلَ كذا </example>
</rule>
<rule id="collo_0009_illa_wa" name="إلا و">
<pattern>
<marker>
<token>إلا</token>
<token postag=".*;W.?.?" postag_regexp="yes"/>
</marker>
</pattern>
<message>عبارة "إلّا و" يستحسن أن تقال:
<suggestion>إلاّ <match no="2" regexp_match="^و" regexp_replace=""/></suggestion>
</message>
<example correction="إلاّ قال" type="incorrect"> ما تحدث <marker>إلا وقال</marker> خيرا </example>
<example type="correct"> ما تَحدَّثَ إلاّ قال خيراً </example>
</rule>
<rule id="collo_11_alakbar_min" name="الأكبر من">
<pattern>
<marker>
<token>الأكبر</token>
<token>من</token>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>التي هي أكبر من</suggestion>
</message>
<example correction="التي هي أكبر من" type="incorrect"> الأعداد <marker>الأكبر من</marker> 10 </example>
<example type="correct"> الأعداد التي هي أكبر من 10 </example>
</rule>
<rule id="collo_0017_in3kas_li" name="انعكاس ل">
<pattern>
<marker>
<token>انعكاس</token>
<token postag="N.*;.?L.?" postag_regexp="yes"/>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>نتيجة <match no="2"/></suggestion>
<suggestion>تعبير عن <match no="2" regexp_match="^ل" regexp_replace=""/></suggestion>
</message>
<example correction="نتيجة لشعور|تعبير عن شعور" type="incorrect"> هل هو <marker>انعكاس لشعور</marker> عام.. </example>
<example type="correct"> هل هو نتيجة لشعور عام../هل هو تعبير عن شعور عام.. </example>
</rule>
<rule id="collo_0024_bikul_ma3ana_kalima" name="بكل معنى الكلمة">
<pattern>
<marker>
<token postag="N.*" postag_regexp="yes"/>
<token>بكل</token>
<token>معنى</token>
<token>الكلمة</token>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion><match no="1"/> حقّاً</suggestion>
<suggestion><match no="1"/> جدُّ <match no="1"/></suggestion>
<suggestion>كلّ [مصدر(<match no="1"/>)]</suggestion>
</message>
<example correction="شجاع حقّاً|شجاع جدُّ شجاع|كلّ [مصدر(شجاع)]" type="incorrect"> خالد
<marker>شجاع بكل معنى الكلمة</marker> </example>
<example type="correct"> خالدٌ شجاعٌ حقّاً </example>
<example type="correct"> خالدٌ شجاعٌ جدُّ شجاع </example>
</rule>
<rule id="collo_0030" name="حتى أنه لم">
<pattern>
<marker>
<token>حتى</token>
<token>أنه</token>
<token>لم</token>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>حتى إنه لم</suggestion>
</message>
<example correction="حتى إنه لم" type="incorrect"><marker>حتى أنه لم</marker> يفهم كلامي </example>
<example type="correct"> حتى إنه لم يفهمْ كلامِي </example>
</rule>
<rule id="collo_0038_siwa_3ala" name="سوى على">
<pattern>
<marker>
<token>سوى</token>
<token>على</token>
</marker>
</pattern>
<message>(سوى) و(غير) تضافان إلى الاسم. ويعرب الاسم بعدهما مضافاً إليه دائماً، ويكون مفرداً؛ أي: ليس جملة ولا شبهها
<suggestion>على سوى</suggestion>
</message>
<example correction="على سوى" type="incorrect"> لم أحصل <marker>سوى على</marker> كتاب واحد </example>
<example type="correct"> لم أحصل على سوى كتاب واحد </example>
</rule>
<rule id="collo_0042_3ada_3an" name="عدا عن">
<pattern>
<marker>
<token>عدا</token>
<token>عن</token>
</marker>
</pattern>
<message>(عدا): أداة يُستثنى بها، والاسمُ بعدها يجوز نصبه وجرّه، ففي حالة النصب تكون (عدا) فعلاً، وفي حالة الجر تكون حرف جرّ.. فإذا اقترنتْ (ما) ب (عدا) وَجَب نصب الاسم بعدها على المفعولية.
<suggestion>عدا</suggestion>
<suggestion>ماعدا</suggestion>
</message>
<example correction="عدا|ماعدا" type="incorrect"> يوجد 50 رجلا <marker>عدا عن</marker> الأطفال </example>
<example type="correct"> يوجد 50 رجلاً عدا الأطفالَ / الأطفالِ </example>
<example type="correct"> يوجد 50 رجلاً ماعدا الأطفالَ </example>
</rule>
<rule id="collo_0043_3ala_hida" name="على حدا |على حدى|حده">
<pattern>
<marker>
<token>على</token>
<token regexp="yes">حدا|حدى|حده</token>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>على حِدَةٍ</suggestion>
</message>
<example correction="على حِدَةٍ" type="incorrect"> جعله <marker>على حدى</marker> </example>
<example type="correct"> جعله على حِدَةٍ </example>
</rule>
<rule id="collo_0045_ghyr_bi" name="غير ب">
<pattern>
<marker>
<token>غير</token>
<token postag_regexp="yes" postag="N.*;.*;-B.?"/>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>بغير <match no="2" regexp_match="^ب" regexp_replace=""/></suggestion>
</message>
<example correction="بغير الله" type="incorrect"> لا تستعن <marker>غير بالله</marker> </example>
<example type="correct"> لا تستعِنْ بغير الله </example>
</rule>
<rule id="collo_0046_thanaiaHu" name="في ثناياه">
<pattern>
<marker>
<token>في</token>
<token regexp="yes">ثنايا(&enclitics;)</token>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="أثنائ"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="تضاعيف"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="طيات"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="أطوائ"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="مطاوي"/></suggestion>
</message>
<example correction="في أثنائه|في تضاعيفه|في طياته|في أطوائه|في مطاويه" type="incorrect"> يحمل <marker>في ثناياه</marker> كل خير </example>
<example type="correct"> يَحمل في أثنائه / تضاعيفه / طياته / أطوائه / مطاويه كلَّ خير </example>
</rule>
<rule id="collo_0046_thanaia" name="في ثنايا">
<pattern>
<marker>
<token>في</token>
<token>ثنايا</token>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="أثناء"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="تضاعيف"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="طيات"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="أطواء"/></suggestion>
<suggestion>في <match no="2" regexp_match="ثنايا" regexp_replace="مطاوي"/></suggestion>
</message>
<example correction="في أثناء|في تضاعيف|في طيات|في أطواء|في مطاوي" type="incorrect"> يحمل <marker>في ثنايا</marker> قلبه كل خير </example>
</rule>
<rule id="collo_0049_kma_anna" name="كما أنّ">
<pattern>
<marker>
<token>كما</token>
<token>أن</token>
</marker>
</pattern>
<message>كما = (ك) التشبيه+ (ما) المصدرية. ولا تستعمل (كما) للعطف والاستئناف
<suggestion>ثم أن</suggestion>
</message>
<example correction="ثم أن" type="incorrect"> كان للجهاز أثر كبير ...، <marker>كما أن</marker> استخدامه سيزداد ... </example>
<example type="correct"> كان للجهاز أثر كبير ...، ثم إن استخدامه سيزداد ... </example>
</rule>
<rule id="collo_0049_kma_wa_anna" name="كما وأنها">
<pattern>
<token>كما</token>
<marker>
<token regexp="yes">و(&forms_anna;)</token>
</marker>
</pattern>
<message>
ويفضل أن يقال: كما
<suggestion><match no="2" regexp_match="^و" regexp_replace=""/></suggestion>
لأن "كما" في هذا السياق، تفيد معنى العطف، والواو حرف عطف. وعطفان لا يجتمعان.
</message>
<example correction="أنها">
المطالعة ممتعة كما
<marker>وأنها</marker> تثري ثقافة القارئ</example>
</rule>
<rule id="collo_0050_kma_yumkin_an" name="كما يمكن أن">
<pattern>
<marker>
<token>كما</token>
<token>يمكن</token>
<token>أن</token>
</marker>
</pattern>
<message>يفضل أن يقال:
<suggestion>ويمكن أن</suggestion>
</message>
<example correction="ويمكن أن" type="incorrect"> يعمل الحاسوب في ...، <marker>كما يمكن أن</marker> تحتاج تجهيزاته إلى... </example>
<example type="correct"> يعمل الحاسوب في ...، ويمكن أن تحتاج تجهيزاته إلى... </example>
</rule>
<rule id="collo_0051_labudda_wa_ann" name="لا بد وأن">
<pattern>
<marker>
<token>لابد</token>
<token>وأن</token>
</marker>
</pattern>
<message>لا تدخل الواوُ بين اسم (لا) و(أن) المصدرية. الأصل: (لا بد من أن...) ويجوز إسقاط الجار قبل (أن)
<suggestion>لابدَّ أن</suggestion>
</message>
<example correction="لابدَّ أن" type="incorrect"><marker>لابد وأن</marker> تتغير الحال </example>
<example type="correct"> لا بدَّ أن تتغير الحال </example>
</rule>
<rule id="collo_0053_la_yajibu_an" name="لا يجب أن">
<pattern>
<marker>
<token>لا</token>
<token>يجب</token>
<token>أن</token>
</marker>
</pattern>
<message>(لا يجب أن تذهب) تعني أن الذهاب ليس واجباً عليك، فيمكنك الذهاب وعدمه
<suggestion>يَجِبُ ألاّ</suggestion>
</message>
<example correction="يَجِبُ ألاّ" type="incorrect"><marker>لا يجب أن</marker> تذهب </example>
<example type="correct"> يَجِبُ ألاّ تذهبَ </example>
</rule>
<rule id="collo_0054_linafridh_an" name="لنفرض أن">
<pattern>
<marker>
<token>لنفرض</token>
<token regexp="yes">أن|&forms_anna;</token>
</marker>
</pattern>
<message>(فَرَض الأمرَ): أوجبه، و(افترض الباحثُ): اتّخذ فَرْضاً ليصل إلى حلّ مسألة.
<suggestion>لنفترض <match no="2"/></suggestion>
</message>
<example correction="لنفترض أن" type="incorrect"><marker>لنفرض أن</marker> س أكبر من ع </example>
<example type="correct"> لنفترض أن س أكبر من ع </example>
</rule>