Generate-bidix-templates

From Apertium
Revision as of 07:32, 14 January 2016 by Unhammer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

generate-bidix-templates is a script that takes two monolingual dictionaries and a bilingual dictionary and produces a set of templates for entries in the bilingual dictionary. For example, consider the equivalence tiempo:temps in Spanish--Catalan. In the bilingual dictionary we would need three entries:

  <e r="LR"><p><l>tiempo<s n="n"/><s n="m"/><s n="sg"/></l><r>temps<s n="n"/><s n="m"/><s n="sp"/></r></p></e>
  <e r="LR"><p><l>tiempo<s n="n"/><s n="m"/><s n="pl"/></l><r>temps<s n="n"/><s n="m"/><s n="sp"/></r></p></e>
  <e r="RL"><p><l>tiempo<s n="n"/><s n="m"/><s n="ND"/></l><r>temps<s n="n"/><s n="m"/><s n="sp"/></r></p></e>

This is because in the Catalan monolingual dictionary, the paradigm for temps has only a single entry:

  <pardef n="temps__n">
    <e><p><l></l><r><s n="n"/><s n="m"/><s n="sp"/></r></p></e>
  </pardef>

But in the Spanish dictionary, the paradigm for tiempo has two entries:

  <pardef n="tiempo__n">
    <e><p><l></l><r><s n="n"/><s n="m"/><s n="sg"/></r></p></e>
    <e><p><l>s</l><r><s n="n"/><s n="m"/><s n="pl"/></r></p></e>
  </pardef>

To make the tags match up we need to have the abovementioned bilingual dictionary entries.

This is what the generate-bidix-templates script does.

Links