@Override
public void newResult(Result result) {
String ref = result.getReferenceText();
if (result.isFinal() && ref != null) {
Lattice lattice = new Lattice(result);
LatticeOptimizer optimizer = new LatticeOptimizer(lattice);
optimizer.optimize();
lattice.computeNodePosteriors(languageModelWeight);
SausageMaker sausageMaker = new SausageMaker(lattice);
Sausage sausage = sausageMaker.makeSausage();
sausage.removeFillers();