Difference between revisions of "Unification of metadix and parametrized dictionaries"

From Apertium
Jump to navigation Jump to search
Line 13: Line 13:
 
==Variants==
 
==Variants==
   
* endowing the <code>e</code> element with a <code>vnt</code> (variant) attribute, so that the corresponding [[metadix]] entry will go to the generated .dix only if that variant is selected (entries without a <code>vnt</code> will go to the .dix unconditionally); this will replace the use of the <code>v</code> attribute as found in the es-ca dictionaries to treat the Valencian dialect or in the es-pt dictionaries to distinguish European and Brazilian Portuguese. Here is an es-ca [[monodix]] example:
+
* endowing the <code>e</code> element with a <code>vnt</code> (variant) attribute (currently <code>v</code> in some dictionaries and <code>aversion</code> [sic] in others), so that the corresponding [[metadix]] entry will go to the generated .dix only if that variant is selected (entries without a <code>vnt</code> will go to the .dix unconditionally); this will replace the use of the <code>v</code> attribute as found in the es-ca dictionaries to treat the Valencian dialect or in the es-pt dictionaries to distinguish European and Brazilian Portuguese. Here is an es-ca [[monodix]] example:
   
 
<pre>
 
<pre>
Line 72: Line 72:
   
 
There are two kinds of parametrized paradigms, which may be called ''word form paradigms'' and ''symbol paradigms'' (word form paradigms are observed in the oc-ca pair and grammatical symbol paradigms are observed in the en-ca dictionaries).
 
There are two kinds of parametrized paradigms, which may be called ''word form paradigms'' and ''symbol paradigms'' (word form paradigms are observed in the oc-ca pair and grammatical symbol paradigms are observed in the en-ca dictionaries).
  +
  +
===Current usage of word form paradigms===
  +
  +
Here is an example of word form paradigms as currently used in the oc-ca dictionaries:
  +
  +
<pre>
  +
<pardef n="ab/i[T]ar__vblex">
  +
<e aversion="oc@aran-ca">
  +
<p>
  +
<l>í</l>
  +
<r>i</r>
  +
</p>
  +
<i><prm/></i>
  +
<par n="cànt/iga__vblex"/>
  +
</e>
  +
<e aversion="oc@aran-ca">
  +
<i>i<prm/></i>
  +
<par n="cant/ar__vblex"/>
  +
</e>
  +
<e aversion="oc-ca">
  +
<i>i<prm/></i>
  +
<par n="cant/as__vblex"/>
  +
</e>
  +
</pardef>
  +
</pre>
  +
  +
In the example, <code><prm/></code> will be substituted by the value of the single parameter, as in:
  +
  +
<pre>
  +
<e lm="abitar">
  +
<i>ab</i>
  +
<par n="ab/i[T]ar__vblex" prm="t"/>
  +
</e>
  +
<e lm="abocinar">
  +
<i>aboc</i>
  +
<par n="ab/i[T]ar__vblex" prm="n"/>
  +
</e>
  +
<e lm="originar">
  +
<i>orig</i>
  +
<par n="ab/i[T]ar__vblex" prm="n"/>
  +
</e>
  +
  +
<e lm="brilhar">
  +
<i>br</i>
  +
<par n="ab/i[T]ar__vblex" prm="lh"/>
  +
</e>
  +
</pre>
  +
  +
This has limitations. On the one hand, a single parameter is used...
  +
  +
(to be written)
  +
  +
===Current usage of symbol paradigms===
  +
  +
(to be written)
  +
  +
===A unifying proposal ===
   
 
(to be written)
 
(to be written)

Revision as of 15:21, 30 October 2007

Different language-pair packages use different strategies to generate .dix dictionaries (monodix) and (bidix) from XML files using features not supported by the .dix format. The objectives of these new dix-like formats are:

  • being able to use parametrized paradigms (so that a general paradigm may be defined and used with small parametrized variations), as discussed in the metadix page;
  • being able to generate different versions of a translator (for instance, for two different varieties of a language, such as Brazilian and European Portuguese) whose names could be ideally tied to mode names

There is currently a debate on a unification of these formats into a single metadix format which in turn could also be used to support other desirable features such as

  • having metadata (headers) in dictionaries which defines whether the dictionary is a bilingual or monolingual dictionary and the language pairs and modes it supports (perhaps this could be added to the basic .dix format

Here is a proposal (open to discussion) on the first two issues.

Variants

  • endowing the e element with a vnt (variant) attribute (currently v in some dictionaries and aversion [sic] in others), so that the corresponding metadix entry will go to the generated .dix only if that variant is selected (entries without a vnt will go to the .dix unconditionally); this will replace the use of the v attribute as found in the es-ca dictionaries to treat the Valencian dialect or in the es-pt dictionaries to distinguish European and Brazilian Portuguese. Here is an es-ca monodix example:
       <e vnt="cat">
         <p>
           <l>haguéssim</l>
           <r>haver<s n="vbhaver"/><s n="pis"/><s n="p1"/><s n="pl"/><j/></r>
         </p>
       </e>

       <e vnt="val">
         <p>
           <l>haguérem</l>
           <r>haver<s n="vbhaver"/><s n="pis"/><s n="p1"/><s n="pl"/><j/></r>
         </p>
       </e>  

And an es-pt monodix example

    <e lm="correto" vnt="pt_BR">
        <i>corret</i>
        <par n="abert/o__adj"/>
      </e>
      
      <e lm="correcto" vnt="pt_PT">
        <i>correct</i>
        <par n="abert/o__adj"/>
      </e>

In structural transfer rule files, rule's may also have variants as observed in the es-pt package. The proposal is to endow element rule with the vnt attribute (currently v):

  • having a way to mark a block of entries as belonging to a certain variant. To that end, a wrapping element e-group (name in discussion; currently named aversion [sic]) would contain a set of entries and this will be equivalent to having all these entries marked with a certain value of the vnt attribute so that writing
<e-group vnt="xx">
<e> ... </e>
<e> ... </e>
</e-group>

would be equivalent to having

<e vnt="xx"> ... </e>
<e vnt="xx"> ... </e>

This may be seen as a way to factor out a common value of vnt. Perhaps one could extend the use of e-group to factor out other attributes such as r.

This could be extended to other linguistic data files such as structural transfer files (.t1x, .t2x, etc.). The corresponding element would be rule-group.

A generalization of this would be a wrap element having three attributes: element (the name of the element affected), attribute (the name of the attribute) and value (the value of the attribute), so that <wrap element="e" attribute="vnt" value="xx"> would be equivalent to <e-group vnt="xx"> and <wrap element="rule" attribute="vnt" value="xx"> would be equivalent to <rule-group vnt="xx">, but perhaps this is too general.

Parametrized paradigms

There are two kinds of parametrized paradigms, which may be called word form paradigms and symbol paradigms (word form paradigms are observed in the oc-ca pair and grammatical symbol paradigms are observed in the en-ca dictionaries).

Current usage of word form paradigms

Here is an example of word form paradigms as currently used in the oc-ca dictionaries:

<pardef n="ab/i[T]ar__vblex">
        <e aversion="oc@aran-ca">
                <p>
                        <l>í</l>
                        <r>i</r>
                </p>
                <i><prm/></i>
                <par n="cànt/iga__vblex"/>
        </e>
        <e aversion="oc@aran-ca">
                <i>i<prm/></i>
                <par n="cant/ar__vblex"/>
        </e>
        <e aversion="oc-ca">
                <i>i<prm/></i>
                <par n="cant/as__vblex"/>
        </e>
     </pardef>

In the example, <prm/> will be substituted by the value of the single parameter, as in:

   <e lm="abitar">
                <i>ab</i>
                <par n="ab/i[T]ar__vblex" prm="t"/>
        </e>
        <e lm="abocinar">
                <i>aboc</i>
                <par n="ab/i[T]ar__vblex" prm="n"/>
        </e>
        <e lm="originar">
                <i>orig</i>
                <par n="ab/i[T]ar__vblex" prm="n"/>
        </e>
   
        <e lm="brilhar">
                <i>br</i>
                <par n="ab/i[T]ar__vblex" prm="lh"/>
        </e>

This has limitations. On the one hand, a single parameter is used...

(to be written)

Current usage of symbol paradigms

(to be written)

A unifying proposal

(to be written)