Difference between revisions of "Iranian Persian and Tajik/Verbs paradigm"

From Apertium
Jump to navigation Jump to search
(Verbs solution for Persian)
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
<center>
  +
<div style="background:pink;font-weight:bold;border:2px solid black;">
  +
We are trying to use metadix for verbs and paradigm and the method in this page will no longer be used then.
  +
</div>
  +
</center>
  +
As it has been disscussed in [[Iranian Persian and Tajik/Verbs]], Persian/Tajik verbs have 2 roots(one for present and one for past). This article says how to define Persian verbs in the "apertium-tg.fa.fa.dix.xml". It is obvious that this method can be used for Tajik Persian monodix file too.
  +
  +
 
== How to add a verb ==
 
== How to add a verb ==
  +
As there are many verbs in Persian that their past and present root has a regular rule, two solution is used here:
  +
* verbs with similar roots
  +
::These verbs only include verbs that if you add {{LangRTL|یدن}} to the present root of them you will have the past root like {{LangRTL|چشیدن}}.
  +
* verbs with distinct roots
  +
=== verbs with similar roots ==
  +
  +
=== Other verbs ===
 
In this solution for adding each verb
 
In this solution for adding each verb
 
#you should add a tag like bellow to main section :
 
#you should add a tag like bellow to main section :
Line 23: Line 38:
 
</pre>
 
</pre>
   
  +
== All code ==
+
== In depth ==
 
This is all the code for defining all verbs in a file like Apertium-tg-fa.fa..dix.xml:
 
This is all the code for defining all verbs in a file like Apertium-tg-fa.fa..dix.xml:
   
Line 154: Line 170:
   
 
</pre>
 
</pre>
  +
  +
[[Category:Development]]

Latest revision as of 10:33, 16 September 2008

We are trying to use metadix for verbs and paradigm and the method in this page will no longer be used then.

As it has been disscussed in Iranian Persian and Tajik/Verbs, Persian/Tajik verbs have 2 roots(one for present and one for past). This article says how to define Persian verbs in the "apertium-tg.fa.fa.dix.xml". It is obvious that this method can be used for Tajik Persian monodix file too.


How to add a verb[edit]

As there are many verbs in Persian that their past and present root has a regular rule, two solution is used here:

  • verbs with similar roots
These verbs only include verbs that if you add یدن to the present root of them you will have the past root like چشیدن.
  • verbs with distinct roots

= verbs with similar roots[edit]

Other verbs[edit]

In this solution for adding each verb

  1. you should add a tag like bellow to main section :
    <e lm="چشیدن"> <par n="/چشیدن__vbser"/></e>
  1. you should define past and present form of the verb according the bellow form in <pardefs>
    <pardef n="/چشیدن__vbser">
      <e>
        <p>
          <l>چشید</l>
          <r>چشیدن<s n="vbser"/><s n="past"/></r>
        </p>
        <par n="V__چشید/ن__vbser"/>
      </e>
      <e>
        <p>
          <l>چش</l>
          <r>چشیدن<s n="vbser"/><s n="pres"/></r>
        </p>
        <par n="ٰV__چش/[چشیدن]__vbser"/>
      </e>
    </pardef>


In depth[edit]

This is all the code for defining all verbs in a file like Apertium-tg-fa.fa..dix.xml:

<?xml version="1.0" encoding="utf-8"?>
<dictionary>
  <alphabet>ابپتثچجحَخِديذةرزژسشصضطظعغقکگلىمنهیئونكفهؤپءٔأآ</alphabet>
<!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-tg-fa.symbols.xml"/>-->
  <sdefs>
    <sdef n="vblex"/>
    <sdef n="pres"/>
    <sdef n="past"/>
    <sdef n="p1"/>
    <sdef n="p2"/>
    <sdef n="p3"/>
    <sdef n="pl"/>
    <sdef n="sg"/>
  </sdefs>

  <pardefs>
    <pardef n="V__چشید/ن__vbser">
      <e>
        <p>
          <l>یم</l>
          <r>ن<s n="vblex"/><s n="past"/><s n="p1"/><s n="pl"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>م</l>
          <r>ن<s n="vblex"/><s n="past"/><s n="p1"/><s n="sg"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>ید</l>
          <r>ن<s n="vblex"/><s n="past"/><s n="p2"/><s n="pl"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>ی</l>
          <r>ن<s n="vblex"/><s n="past"/><s n="p2"/><s n="sg"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>ند</l>
          <r>ن<s n="vblex"/><s n="past"/><s n="p3"/><s n="pl"/></r>
        </p>
      </e>
      <e>
        <p>
          <l/>
          <r>ن<s n="vblex"/><s n="past"/><s n="p3"/><s n="sg"/></r>
        </p>
      </e>
    </pardef>
    <pardef n="ٰV__چش/[منتبیدن]__vbser">
      <e>
        <p>
          <l>ید</l>
          <r><s n="vblex"/><s n="imp"/><s n="p2"/><s n="pl"/></r>
        </p>
      </e>
      <e>
        <p>
          <l/>
          <r><s n="vblex"/><s n="imp"/><s n="p2"/><s n="sg"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>یم</l>
          <r><s n="vblex"/><s n="prs"/><s n="p1"/><s n="pl"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>م</l>
          <r><s n="vblex"/><s n="prs"/><s n="p1"/><s n="sg"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>ید</l>
          <r><s n="vblex"/><s n="prs"/><s n="p2"/><s n="pl"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>ی</l>
          <r><s n="vblex"/><s n="prs"/><s n="p2"/><s n="sg"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>ند</l>
          <r><s n="vblex"/><s n="prs"/><s n="p3"/><s n="pl"/></r>
        </p>
      </e>
      <e>
        <p>
          <l>د</l>
          <r><s n="vblex"/><s n="prs"/><s n="p3"/><s n="sg"/></r>
        </p>
      </e>
    </pardef>
    <pardef n="/چشیدن__vbser">
      <e>
        <p>
          <l>چشید</l>
          <r>چشیدن<s n="vbser"/><s n="past"/></r>
        </p>
        <par n="V__چشید/ن__vbser"/>
      </e>
      <e>
        <p>
          <l>چش</l>
          <r>چشیدن<s n="vbser"/><s n="pres"/></r>
        </p>
        <par n="ٰV__چش/[چشیدن]__vbser"/>
      </e>
    </pardef>
  </pardefs>
  <section id="main" type="standard">
    <e lm="چشیدن"> <i></i><par n="/چشیدن__vbser"/></e>
  </section>
</dictionary>