You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

Language packs are pre-built translation models with an included instance of the Joshua runtime environment. A key feature is that there are no dependencies (apart from Java 8). Getting a machine translation system running on your own machine is as easy as downloading the tarball, unpacking it, and running the included shell script.

Language Packs Are Being Updated

Language packs for 62 languages have been released! These models should be considered provisional, in the style publishing something and then iterating and improving as demand and resources become available. If you have questions, comments, concerns, or wish to help, please post questions to the Joshua mailing list: user@joshua.apache.org.

The following language packs are available for Joshua. Click the links on the full language pair names to download the models directly. You might be interested in notes on how most of these models were built, including information about how to make them faster (with a little elbow-grease), better (with a little knowledge), and what you might want to do with them.

ISO 639Language pairRelease DateSizeNotes
en-enEnglish–English2016-11-18variousEnglish paraphrase packs from the Paraphrase Database
am-enAmharic–English2016-11-18841 MB 
ar-enArabic–English2016-11-181.4 GB

 

az-enAzerbaijani–English2016-11-18846 MB 
bg-en

Bulgarian–English

2016-11-182.2 GB 
bn-enBengali–English2016-11-18893 MB 
bs-enBosnian–English2016-11-181.4 GB 
ca-enCatalan–English2016-11-18936 MB 
cs-enCzech–English2016-11-182.7 GB 
da-enDanish–English2016-11-183.5 GB 
de-enGerman–English2016-11-184.0 GB 
dv-en

Dhivehi–English

2016-11-18873 MB 
el-enGreek–English2016-11-183.2 GB 
en-ruEnglish-Russian 4.6 GBLanguage model data sources can be found within the artifact README file
es-enSpanish–English2016-11-184.8 GB 
et-enEstonian–English 2016-11-182.2 GB 
eu-enBasque–English 2016-11-18877 MB 
fa-enPersian–English 2016-11-181.3 GB 
fi-enFinnish–English 2016-11-182.6 GB 
fr-enFrench–English 2016-11-184.0 GB 
ga-enIrish–English 2016-11-18866 MB 
gl-enGalician–English 2016-11-18879 MB 
ha-enHausa–English2016-11-18853 MB 
he-enHebrew–English2016-11-181.4 GB 
hi-enHindi–English 2016-11-18858 MB 
hr-enCroatian–English 2016-11-181.4 GB 
hu-enHungarian–English 2016-11-182.0 GB 
id-enIndonesian–English2016-11-181.4 GB 
is-enIcelandic–English 2016-11-181.1 GB 
it-enItalian–English 2016-11-183.9 GB 
ka-enGeorgian–English 2016-11-18849 MB 
ku-enKurdish–English 2016-11-18827 MB 

lt-en

Lithuanian–English2016-11-182.0 GB 
lv-enLatvian–English 2016-11-182.0 GB 
mg-enMalagasy–English 2016-11-18907 MB 
mk-enMacedonian–English 2016-11-181.4 GB 
ml-enMalayalam–English 2016-11-18851 MB 
ms-enMalay–English 2016-11-181014 MB 
mt-enMaltese–English 2016-11-181.4 GB 
nl-enDutch–English 2016-11-183.6 GB 
no-enNorwegian–English 2016-11-181.4 GB 
pl-enPolish–English 2016-11-182.8 GB 
pt-enPortuguese–English 2016-11-184.5 GB 
ro-enRomanian–English 2016-11-182.5 GB 
ru-enRussian–English 2016-11-181.9 GB 
ru-enRussian-English 4.4 GBLanguage model data sources can be found within the artifact README file
sd-enSindhi–English 2016-11-18837 MB 
si-enSinhala–English 2016-11-18862 MB 
sk-enSlovak–English 2016-11-182.4 GB 
sl-enSlovenian–English 2016-11-182.3 GB 
so-enSomali–English 2016-11-18850 MB 
sq-enAlbanian–English 2016-11-181.3 GB 
sr-enSerbian–English2016-11-181.5 GB 
sv-enSwedish–English2016-11-183.4 GB 
sw-enSwahili–English 2016-11-18859 MB 
ta-enTamil–English 2016-11-18832 MB 
te-enTelugu–English 2016-11-18823 MB 
tg-enTajik–English 2016-11-18851 MB 
th-enThai–English 2016-11-181.1 GB 
tr-enTurkish–English 2016-11-181.4 GB 
tt-enTatar–English 2016-11-18840 MB 
ug-enUighur–English 2016-11-18838 MB 
uk-enUkrainian–English 2016-11-18984 MB 
ur-enUrdu–English2016-11-18866 MB 
vi-enVietnamese–English2016-11-181.2 GB 

Using Language Packs

Once you download the model, unpack it. The simplest use-case is then to run Joshua as a standard UNIX tool, accepting a single line of input and writing a single line of output. Assuming your language pack is downloaded to "apache-joshua-language-pack.tgz":

# SRC and TRG are the two-character ISO 639-1 language codes
tar xzf apache-joshua-SRC-TRG-YYYY-MM-DD.tgz
cd apache-joshua-SRC-TRG-YYYY-MM-DD
cat example.SRC | ./prepare.sh | ./joshua

Here, "example.SRC" is a file containing sentences in your input language (e.g., "es" for Spanish), one per line. Joshua expects to be given one sentence at a time; it will not do this for documents by itself.

There is some startup cost associated with the models, however. You may find it more beneficial, therefore, to run it as a server. Joshua can run in two server modes: raw TCP, and HTTP.

# start in server mode, taking direct TCP/IP connections
./joshua -server-port 5674 -server-type tcp
cat example.SRC | nc localhost 5674
 
# start in server mode, answering web queries.
./joshua -server-port 5674 -server-type http
# Then open "web/index.html?port=5674" in your browser

Decoder Options

Joshua supports many command-line options controlling its output. By default, it outputs only a single hypothesis per input line. Here are some options that may be useful to you:

  • "-m XXg" — increase the amount of memory provided to Joshua. The default is 8g, but for the larger language packs, you will want 16 or 24. In general, 50% more memory than the raw model size should be more than sufficient.
  • "-top-n N" — output up to N translation candidates, instead of just one.
  • "-output-format STRING" — change the output format. By default, Joshua outputs just the single, tokenized translation with the highest model probability. 
    Here are some other options:
    • %s: the raw translated string
    • %S: the detokenized translated string
    • %e: the source string
    • %i: the sequence number (0-indexed)
    • %c: the model score
    • %f: the feature string
    These can all be combined in a single string, e.g., -output-format "%i ||| %s ||| %f ||| %c"

Citations

Please cite the following paper if you use Joshua in your research.

  @article{post2015joshua,
Author = {Post, Matt and Cao, Yuan and Kumar, Gaurav},
Journal = {The Prague Bulletin of Mathematical Linguistics},
Title = {Joshua 6: A phrase-based and hierarchical statistical machine translation system},
Year = {2015}
}
  • No labels