The Joshua source code repository is located at http://github.com/joshua-decoder/joshua.
Apache Ant version 1.8.0 or greater
Doxygen version 1.8.0 or greater
A POSIX environment
Git
(optional) Eclipse If you are developing Joshua using Eclipse, please import the GoogleStyle formatter configuration eclipse-java-google-style.xml
, which can be downloaded from http://code.google.com/p/google-styleguide/source/browse/trunk.
In Eclipse preferences, go to Java -> Code Style -> Formatter. Then click on Import... and choose eclipse-java-google-style.xml
.
You can download Joshua and compile it with the following commands.
git clone https://github.com/joshua-decoder/joshua.git cd joshua export JOSHUA=$(pwd) ant devel
The devel
target downloads a number of dependencies using Ivy, along with the Thrax submodule, and then compiles everything, include support tools like KenLM and GIZA++ (which are included).
https://groups.google.com/forum/#!forum/joshua_developers
https://github.com/joshua-decoder/joshua/issues
Documenting Joshua is of great importance. The manual is automatically generated using Doxygen. Find out more on the [documentation](@ref documentation) page.
If you are using Eclipse, the project settings can be loaded automatically by pointing Eclipse to the $JOSHUA/.settings/ directory. If you are using another tool, please follow these conventions:
100 characters maximum line width
Indent with 2 spaces
In emacs:
(setq tab-width 2) (setq-default indent-tabs-mode nil)
Use spaces only for tabbing
Open brace on same line
Keep else if
on one line
Here's an example of building a release versioned “2012-07-18”. It will be placed at release/joshua-2012-07-18.tgz
.
export JOSHUA_VERSION=2012-07-18 export HADOOP=/path/to/hadoop export HADOOP_CONF_DIR=/path/to/hadoop/config export HADOOP_VERSION="0.20.203.0" export AWS_SDK=/path/to/aws export AWS_VERSION="1.1.3" git clone https://github.com/joshua-decoder/joshua.git cd joshua export JOSHUA=`pwd` git checkout -b devel origin/devel git submodule update --init cd thrax ant cd $JOSHUA ant release
Dependencies such as JAR archives are automatically downloaded by the Apache Ivy dependency management tool, which is designed to interact with the ant
build tool.
To add a new dependency to the list of automatically downloaded archive libraries, follow these steps:
Search for the library in Maven Central Repository or MVN Repository.
If the desired library is found, both websites provide the line that you would add under <dependencies>
in ivy.xml
. E.g. for asm-3.1.jar, the line that would be added is:
<dependency org="asm" name="asm" rev="3.1"/>
More obscure libraries can be found to be hosted in less common repositories. Additional repositories can be added to the $JOSHUA/ivysettings.xml
file.