In every training iteration i, we randomly sample the training instances, and perform online learning with early update (Collins and Roark, 2004).
given a training example, we use beam-search to decode the sentence.