Difference between revisions of "Language pair packages"

From Apertium
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 37: Line 37:
== List of ready-to-use packages ==
== List of ready-to-use packages ==


Out of the 31 released pairs, the following 24 have fully working and ready-to-use packages that are maintained under the <code>builds/</code> directory at [[SVN]]. You can directly launch them in a Java enabled browser by clicking in the ''JWS'' links. You can also download the JARs and run them as standard Java applications or use them from a client application by clicking in the ''JAR'' links.
Out of the 31 released pairs, the following 25 have fully working and ready-to-use packages that are maintained under the <code>builds/</code> directory at [[SVN]]. You can directly launch them in a Java enabled browser by clicking in the ''JWS'' links. You can also download the JARs and run them as standard Java applications or use them from a client application by clicking in the ''JAR'' links.

'''The list below is outdated.'''
In 2020 the pairs can be found here: https://svn.code.sf.net/p/apertium/svn/builds/language-pairs



{|style="border: 0px solid #fbfbfb"
{|style="border: 0px solid #fbfbfb"
Line 47: Line 51:
*English ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-ca/apertium-en-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-ca/apertium-en-ca.jar JAR])
*English ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-ca/apertium-en-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-ca/apertium-en-ca.jar JAR])
*English ⇆ Galician ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-gl/apertium-en-gl.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-gl/apertium-en-gl.jar JAR])
*English ⇆ Galician ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-gl/apertium-en-gl.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-gl/apertium-en-gl.jar JAR])
|style="width:11%; border: 0px solid #fbfbfb; font-size:95%; background:#fbfbfb; vertical-align: top;"|
*English ⇆ Spanish ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-es/apertium-en-es.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-es/apertium-en-es.jar JAR])
*English ⇆ Spanish ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-es/apertium-en-es.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-en-es/apertium-en-es.jar JAR])
|style="width:11%; border: 0px solid #fbfbfb; font-size:95%; background:#fbfbfb; vertical-align: top;"|
*Esperanto ← Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-ca/apertium-eo-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-ca/apertium-eo-ca.jar JAR])
*Esperanto ← Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-ca/apertium-eo-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-ca/apertium-eo-ca.jar JAR])
*Esperanto ⇆ English ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-en/apertium-eo-en.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-en/apertium-eo-en.jar JAR])
*Esperanto ⇆ English ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-en/apertium-eo-en.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-en/apertium-eo-en.jar JAR])
Line 54: Line 58:
*Esperanto ← Spanish ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-es/apertium-eo-es.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-es/apertium-eo-es.jar JAR])
*Esperanto ← Spanish ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-es/apertium-eo-es.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-eo-es/apertium-eo-es.jar JAR])
*French ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-ca/apertium-fr-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-ca/apertium-fr-ca.jar JAR])
*French ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-ca/apertium-fr-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-ca/apertium-fr-ca.jar JAR])
|style="width:11%; border: 0px solid #fbfbfb; font-size:95%; background:#fbfbfb; vertical-align: top;"|
*French ⇆ Spanish ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-es/apertium-fr-es.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-es/apertium-fr-es.jar JAR])
*French ⇆ Spanish ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-es/apertium-fr-es.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-fr-es/apertium-fr-es.jar JAR])
|style="width:11%; border: 0px solid #fbfbfb; font-size:95%; background:#fbfbfb; vertical-align: top;"|
*Haitian → English ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-ht-en/apertium-ht-en.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-ht-en/apertium-ht-en.jar JAR])
*Haitian → English ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-ht-en/apertium-ht-en.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-ht-en/apertium-ht-en.jar JAR])
*Occitan ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-oc-ca/apertium-oc-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-oc-ca/apertium-oc-ca.jar JAR])
*Occitan ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-oc-ca/apertium-oc-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-oc-ca/apertium-oc-ca.jar JAR])
Line 61: Line 65:
*Portuguese ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-ca/apertium-pt-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-ca/apertium-pt-ca.jar JAR])
*Portuguese ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-ca/apertium-pt-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-ca/apertium-pt-ca.jar JAR])
*Portuguese ⇆ Galician ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-gl/apertium-pt-gl.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-gl/apertium-pt-gl.jar JAR])
*Portuguese ⇆ Galician ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-gl/apertium-pt-gl.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-pt-gl/apertium-pt-gl.jar JAR])
|style="width:11%; border: 0px solid #fbfbfb; font-size:95%; background:#fbfbfb; vertical-align: top;"|
*Spanish ⇆ Aragonese ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-an/apertium-es-an.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-an/apertium-es-an.jar JAR])
*Spanish ⇆ Aragonese ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-an/apertium-es-an.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-an/apertium-es-an.jar JAR])
|style="width:11%; border: 0px solid #fbfbfb; font-size:95%; background:#fbfbfb; vertical-align: top;"|
*Spanish ⇆ Asturian ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-ast/apertium-es-ast.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-ast/apertium-es-ast.jar JAR])
*Spanish ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-ca/apertium-es-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-ca/apertium-es-ca.jar JAR])
*Spanish ⇆ Catalan ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-ca/apertium-es-ca.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-ca/apertium-es-ca.jar JAR])
*Spanish ⇆ Galician ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-gl/apertium-es-gl.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-gl/apertium-es-gl.jar JAR])
*Spanish ⇆ Galician ([https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-gl/apertium-es-gl.jnlp JWS], [https://apertium.svn.sourceforge.net/svnroot/apertium/builds/apertium-es-gl/apertium-es-gl.jar JAR])
Line 70: Line 75:
|-
|-
|}
|}

== Problematic language pairs ==

It is not possible to create a package for the last released version of Spanish ⇆ Asturian (''apertium-es-ast''), although, in principle, the pair is supposed to be compatible. The issue seems to be caused by unreasonably long rules in the transfer files that happen to be problematic due to the method size limitations of Java bytecode. Although the Java bytecode classes are now successfully generated, dx still hangs while trying to convert them to Dalvik bytecode. This means that, although the pair can be used from desktop applications, it would crash in Android, so creating a fully functional package for it is not possible yet.


== Language pairs with external dependencies ==
== Language pairs with external dependencies ==


The following 6 released pairs depend on [[Apertium_and_Constraint_Grammar|CG]]:
The following 7 released pairs depend on [[Apertium_and_Constraint_Grammar|CG]]:


*Breton → French (''apertium-br-fr'')
*Breton → French (''apertium-br-fr'')
Line 85: Line 86:
*Norwegian Nynorsk ⇆ Bokmål (''apertium-nn-nb'')
*Norwegian Nynorsk ⇆ Bokmål (''apertium-nn-nb'')
*Welsh → English (''apertium-cy-en'')
*Welsh → English (''apertium-cy-en'')
*Kazakh ⇆ Tatar (''apertium-kaz-tat'')


Invoking external programs is supported by language pair packages, so it is still possible to create packages for these pairs. However, you will need to install [[Apertium_and_Constraint_Grammar|CG]] in your machine for them to work. Due to this limitation, precompiled binaries are not offered for these pairs, but you can still create them by following the instructions in the previous section.
Invoking external programs is supported by language pair packages, so it is still possible to create packages for these pairs. However, you will need to install [[Apertium_and_Constraint_Grammar|CG]] in your machine for them to work. Due to this limitation, precompiled binaries are not offered for these pairs, but you can still create them by following the instructions in the previous section.

Latest revision as of 08:23, 7 April 2020

The English ⇆ Spanish package running as a standalone Java application. The same file could be used from other client applications like Apertium-Caffeine or Apertium-OmegaT.

Language pair packages are standalone JARs that can be run independently as well as used from other client applications like Apertium-Caffeine or Apertium-OmegaT. The only prerequisite to use them is Java 6 or better (apertium, lttoolbox or lttoolbox-java are NOT required), and they can work on practically any platform (Linux, OS X, Windows and even Android!).

Internal structure[edit]

Since JAR files are nothing but renamed ZIP files, you can easily edit language pair packages to fit your needs. Note that the packages are ready to be used without any modification, so the vast majority of users will not get any notable advantage from doing it. In any case, editing packages could happen to be useful, for instance, in order to reduce their file size by removing unnecessary content.

The typical structure of a language pair package would be the following one:

  • data/: Directory containing the language pair itself. You could extract it and use with your local installation of Apertium.
  • transfer_classes/: Directory that contains the Java bytecode classes for transfer. This is only used when using the package from standard Java so, if you are going to use it exclusively from Android, you can delete it.
  • org/: Directory that contains the lttoolbox-java engine, which makes the package self-executable. If you are not interested on this feature (presumably, because you are going to use the package exclusively from client programs), you can delete it.
  • META-INF/: Directory that contains the MANIFEST.MF of this Jar, which is used by Java. It takes a few bytes and can rarely be removed, so please don't touch it unless you know what you are doing.
  • classes.dex: Dalvik bytecode of the transfer classes, used by Android instead of the standard Java bytecode classes at transfer_classes/. If you are not going to use the package from Android, you can delete it.
  • modes: Text file that lists the path of the available modes inside the package that is used by lttoolbox-java. It takes a few bytes and can rarely be removed, so please don't touch it unless you know what you are doing.
  • README: Text file describing the content of the package.

Creating language pair packages[edit]

In order to create language pair packages, a working installation of the last version of lttoolbox-java at SVN is required. Provided that you meet this requirement, you simply need to run apertium-pack-j passing the mode files for which you want to generate the package as argument. For instance, the following command would create a ready-to-use package for the Esperanto ⇆ English language pair named apertium-eo-en.jar (the first argument determines the name of the output file):

apertium-pack-j /usr/local/share/apertium/modes/eo-en.mode /usr/local/share/apertium/modes/en-eo.mode

Creating Android compatible packages[edit]

In order to create Android compatible packages, you need a working installation of the Android SDK. Once you have it, you need to specify its location by setting the ANDROID_SDK_PATH environment variable as follows:

export ANDROID_SDK_PATH="/home/mikel/developer/android-sdk-linux"

You will need to replace /home/mikel/developer/android-sdk-linux with the right path of your Android SDK installation.

Once you have done it, simply run apertium-pack-j as explained above, and the generated package will be compatible with Android devices.

List of ready-to-use packages[edit]

Out of the 31 released pairs, the following 25 have fully working and ready-to-use packages that are maintained under the builds/ directory at SVN. You can directly launch them in a Java enabled browser by clicking in the JWS links. You can also download the JARs and run them as standard Java applications or use them from a client application by clicking in the JAR links.

The list below is outdated. In 2020 the pairs can be found here: https://svn.code.sf.net/p/apertium/svn/builds/language-pairs


  • Afrikaans ⇆ Dutch (JWS, JAR)
  • Basque → English (JWS, JAR)
  • Basque → Spanish (JWS, JAR)
  • Catalan ⇆ Italian (JWS, JAR)
  • English ⇆ Catalan (JWS, JAR)
  • English ⇆ Galician (JWS, JAR)
  • English ⇆ Spanish (JWS, JAR)
  • Esperanto ← Catalan (JWS, JAR)
  • Esperanto ⇆ English (JWS, JAR)
  • Esperanto ← French (JWS, JAR)
  • Esperanto ← Spanish (JWS, JAR)
  • French ⇆ Catalan (JWS, JAR)
  • French ⇆ Spanish (JWS, JAR)
  • Haitian → English (JWS, JAR)
  • Occitan ⇆ Catalan (JWS, JAR)
  • Occitan ⇆ Spanish (JWS, JAR)
  • Portuguese ⇆ Catalan (JWS, JAR)
  • Portuguese ⇆ Galician (JWS, JAR)
  • Spanish ⇆ Aragonese (JWS, JAR)
  • Spanish ⇆ Asturian (JWS, JAR)
  • Spanish ⇆ Catalan (JWS, JAR)
  • Spanish ⇆ Galician (JWS, JAR)
  • Spanish ⇆ Portuguese (JWS, JAR)
  • Spanish ← Romanian (JWS, JAR)
  • Swedish → Danish (JWS, JAR)

Language pairs with external dependencies[edit]

The following 7 released pairs depend on CG:

  • Breton → French (apertium-br-fr)
  • Icelandic → English (apertium-is-en)
  • Macedonian ⇆ Bulgarian (apertium-mk-bg)
  • Macedonian → English (apertium-mk-en)
  • Norwegian Nynorsk ⇆ Bokmål (apertium-nn-nb)
  • Welsh → English (apertium-cy-en)
  • Kazakh ⇆ Tatar (apertium-kaz-tat)

Invoking external programs is supported by language pair packages, so it is still possible to create packages for these pairs. However, you will need to install CG in your machine for them to work. Due to this limitation, precompiled binaries are not offered for these pairs, but you can still create them by following the instructions in the previous section.