Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



44 Commits

Repository files navigation


The method of this toolkit is decribed in the paper "Zipporah: a Fast and Scalable Data Cleaning System for Noisy Web-Crawled Parallel Corpora."

If you have question, feel free to email me at hainan.xv AT gmail Dot com. I left my JHU email in the paper however it seems to classify some of the query emails as spam.

Step 1,

$> git clone
$> cd zipporah
$> git checkout paper-version
$> ./

Step 2,

Change the config file; an example is configs/test. First you need to change the following variables,

srilm=your/path/to/srilm/   # for branch paper-version only

Step 3,

Provide the location for your corpus. We need good/dev/bad-corpus variables set. The meaning of those corpora are,

  • "bad" corpus refers to the data you want to filter on;
  • "good" corpus refers to the "training data" described in the paper. We recommend that you use a large and clean corpus for this, e.g. Europarl
  • "dev" corpus refers to the "dev data" in the paper. We recommend that you use a clean corpus for this, and a size of 2000-3000 parallel sentence pairs is sufficient.

Have either




The *stem_good/*stem_bad variables should be a prefix of text files. For example, if clean_stem_dev is /home/user/newstest and input/output-lang are es/en, then the system would look for file /home/user/ and /home/user/newstest.en and use them as the "dev data".

The word "clean" or "raw" would indicate whether the corpus is tokenized and truecased. If it's raw, then Zipporah would try to tokenize and truecase them; if "clean" is provided then Zipporah would start processing them directly.

Step 4,

$> ./ [config-file]

would run the data selection and generate a score file in $working/$experiment_id/step-4/bad/corpus.xz

(experiment_id will be an integer starting from 0; if a directory n is already there, then experiment_id will become n+1)

./ supports more arguments

  • ./ config-file experiment-id would force to use the experiment-id argument
  • ./ config-file experiment-id stage would start at a specific stage

There are 4 stages in the system, see scripts/[1234].sh

  • processes good data and dev data
  • processes bad data
  • computes the features on all data
  • trains the logistic regression model and computes scores

Common issues:

  1. The system assumes you have GridEngine installed and you are running the system on a grid. If not, you might get errors complaining about qsub not being installed. If that happens, you can change the "" file to this file instead (, just copy the content of this file and override the old file and no other changes are needed. Thanks Kaldi developers for writing this wrapper), and then the system would run locally. If you need to make this change, you may also want to change all the number of jobs config to 1 to avoid overloading your machine.
  2. You would need to pre-install Moses ( We use a number of commands in Moses and you might need to change the paths if the system complains about /mosesdecoder/ commands, e.g. fast_align and kenlm.
  3. Right now there seems to be a bug regarding providing trained truecasers. I prepared a fix at branch "fix-truecaser-bug" which I think should fix the issue but this has not been extensively tested. If you want to use your custom truecaser you can use that branch. I will try to merge it when it's fully tested. If you want Zipporah to train the truecaser automatically, you can use branch "paper-version", which is bug-free and is the version we used in the paper. The newer version, however, seems to perform slightly better than the paper-version.


No description, website, or topics provided.







No releases published


No packages published