Made decode_with_trees flush after every input sentence