From Apertium
Revision as of 10:49, 10 March 2008 by Ebenimeli (talk | contribs) (→‎See also: --> Link to How to create a Linguistic Resources Document)
Jump to navigation Jump to search
Main article: Building dictionaries


$ svn co

Software prerequisites

You will need to install Ant and Java Development Kit 6 (JDK6)

$ sudo apt-get install ant sun-java6-jdk


$ cd apertium-crossdics
$ ant jar


$ sudo ant install

Using apertium-crossdics

$ apertium-crossdics

Crossing dictionaries

Using a Linguistic Resources Document

You can define a Linguistic Resources Document (LRD) and use it to indicate which dictionaries will be used for crossing:

$ apertium-dictools cross2 -f my-linguistic-resources.xml sl-tl

Therefore, only 2 parameters are needed:

  • my-linguistic-resources.xml: a document specifying a set of linguistic resources (dictionary, cross models, corpora, other LRD files, etc).
  • sl-tl: source language (sl) and target language (tl).

Note that this form uses the apertium-dictools script (the apertium-crossdics script still uses the "old" form)

Without a Linguistic Resources Document

First of all, copy linguistic data into folder "dics"

  • Bilingual dictionary A-B:
  • Bilingual dictionary B-C:
  • Morphological dictionary A: apertium-bb-aa.aa.dix
  • Morphological dictionary C:

Please note that:

  • all dictionaries must be in the form:
    • apertium-xx-yy.xx-yy.dix (bilingual dictionaries)
    • apertium-xx-yy.xx.dix (morphological dictionaries)
  • the common language (B) must be in the left side, that is, dictionaries in the form B-A and B-C
  • use "-r" instead of "-n" if the dictionary has to be reversed (apertium-aa-bb.aa-bb.dix to

Use the apertium-crossdics script to cross the dictionaries:

$ apertium-crossdics monA.dix -n bilAB.dix -n bilBC-dix monC.dix

An example crossing es-ca and es-pt to get the ca-pt pair.

$ apertium-crossdics dics/ -n dics/ -n dics/ dics/

Customizing cross actions

By default, the crossdics tool uses a simple cross model defining very simple rules for crossing two sets of dictionaries. However, more specific cross actions might be needed in order to cross certain language pairs correctly. Defining a new cross schema with concrete pattern-action elements solves this problem.

See also