Closed linuxscout closed 2 years ago
Implemented:
Class: org/languagetool/rules/ar/MasdarToVerbFilter.java
Data ; added as Map inside code Rule :
<?xml version="1.0" encoding="UTF-8"?>
<rule id="syntax_0000_Qam_bi_test" name="قام بعمل">
<pattern>
<marker>
<token inflected="yes">قَامَ</token>
<token postag="NM.*;.*;-B.*" postag_regexp="yes" />
</marker>
</pattern>
<filter class="org.languagetool.rules.ar.MasdarToVerbFilter" args="verb:\1 noun:\2" />
<message>تعبير "القيام بـ" ركيك يستحسن تجنبه إلى تصريف المصدر الموالي، قل ضربت بدلا من القيام بالضرب.</message>
</example> -->
<example correction="عملت" type="incorrect">
<marker>قمت بالعمل</marker>
في الامتحان
</example>
<example correction="يعملون" type="incorrect">
<marker>يقومون بالعمل</marker>
في الامتحان
</example>
<example correction="وسيأكلون" type="incorrect">
<marker>وسيقومون بالأكل</marker>
في الامتحان
</example>
<example correction="أعملت" type="incorrect">
<marker>قامت بالإعمال</marker>
في الامتحان
</example>
<example correction="اسألن|اسألنان|سألن|سئلن" type="incorrect">
<marker>قمن بالسؤال</marker>
في الامتحان
</example>
</rule>
To Do
Need: القاعدة الآتية: (تعبير ركيك) قام بالسؤال => سأل قامت بالشرب=> شربت فسيقومون بالعمل => فسيعملون
Each rule need to get a verb from Noun (Masdar), than inflect it according to "قام" inflection.