sohaibafifi / languagetool

A fork of languagetool to maintain Arabic
https://languagetool.org
GNU Lesser General Public License v2.1
18 stars 1 forks source link

Tanwin Nasb for Masdar #70

Closed linuxscout closed 2 years ago

linuxscout commented 2 years ago

الحالة: استعمالا => يستحسن كتابة التنوين استعمالًا في هذه الحالة، نقترح على المستخدم أن تكون الكلمة في المثنى، أو في المفرد ويستحسن وضع التنوين ،

linuxscout commented 2 years ago

Implemented as XML rule

            <rule id="typo_000_tanwin_nasb2" name="تنوين النصب" type="style">
          <!--      حلة الاسم الجامد المنوّن، منته بألف
      ما عدا: ما لا ينتهي بألف أو ألف وتنوين-->
         <antipattern> 
        <token regexp="yes">.*&alef;(&tanwin_fathatan;)$|.*(&tanwin_fathatan;)&alef;$|.*(&fatha;)&alef;$</token>
        </antipattern>
        <pattern>
          <marker>
              <token postag="N.*;M1[A].?;.?-n" postag_regexp="yes"/>
          </marker>
        </pattern>
        <message>يستحسن وضع علامة التنوين أو الفتح للتفريق بين الاسم المنوّن وغيره
: <suggestion><match no="1" regexp_match="&alef;$" regexp_replace="&tanwin_fathatan;&alef;"/></suggestion>
: <suggestion><match no="1" regexp_match="&alef;$" regexp_replace="&fatha;&alef;"/></suggestion>
        </message>
            <example correction="استعمالًا|استعمالَا"  type="incorrect">استعمله  <marker>استعمالا</marker></example>
      </rule>