Difference between revisions of "Generate-bidix-templates"

From Apertium
Jump to navigation Jump to search
(Created page with "'''generate-bidix-templates''' is a script that takes two monolingual dictionaries and a bilingual dictionary and produces a set of templates for entries...")
 
 
Line 33: Line 33:
   
 
[[Category:Scripts]]
 
[[Category:Scripts]]
  +
  +
[[Category:Documentation]]
  +
[[Category:Writing dictionaries]]
  +
[[Category:Documentation in English]]

Latest revision as of 07:32, 14 January 2016

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[edit]