Talk:Metadix

From Apertium
Revision as of 23:30, 26 November 2009 by Jimregan (talk | contribs) (an example of Sergio's proposed extended metadix (as far as I understood it))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

At the Apertium EGM at FreeRBMT, Sergio proposed to integrate an enhanced version of metadix into the compiler; as I understood it, the new syntax will look similar to this:

  <par n="v/[a][ter]__n">
    <e>
      <p>
        <l><prm n="1"/><prm n="3"/></l>
        <r><prm n="1"/><prm n="3"/><s n="n"/><s n="sg"/><s n="nom"/></r>
      </p>
    </e>
    <e>
      <p>
        <l><prm n="2"/><prm n="3"/></l>
        <r><prm n="1"/><prm n="3"/><s n="n"/><s n="pl"/><s n="nom"/></r>
      </p>
    </e>
    <e>
      <p>
        <l><prm n="1"/><prm n="3"/>s</l>
        <r><prm n="1"/><prm n="3"/><s n="n"/><s n="sg"/><s n="gen"/></r>
      </p>
    </e>
    <e>
      <p>
        <l><prm n="2"/><prm n="3"/>n</l>
        <r><prm n="1"/><prm n="3"/><s n="n"/><s n="sg"/><s n="dat"/></r>
      </p>
    </e>
  </pardef>

  <e lm="vater"><i>v</i><par n="v/[a][ter]__n" prm="a" prm="ä" prm="ter"/></e>

That is; <prm> elements will be numbered (so they may be freely placed anywhere within the pardef), while prm attributes will be specified with an implicit order; the above paradigm with the specified parameters will expand to this:

  <par n="v/[a][ter]__n">
    <e>
      <p>
        <l>ater</l>
        <r>ater<s n="n"/><s n="sg"/><s n="nom"/></r>
      </p>
    </e>
    <e>
      <p>
        <l>äter</l>
        <r>ater<s n="n"/><s n="pl"/><s n="nom"/></r>
      </p>
    </e>
    <e>
      <p>
        <l>aters</l>
        <r>ater<s n="n"/><s n="sg"/><s n="gen"/></r>
      </p>
    </e>
    <e>
      <p>
        <l>ätern</l>
        <r>ater<s n="n"/><s n="sg"/><s n="dat"/></r>
      </p>
    </e>
  </pardef>