first = false;
trainer.addAlignmentListener(new AEListener(reporter));
}
PerplexityReporter pr = new PerplexityReporter();
AlignmentPosteriorGrid model1g= null;
if (value.hasAlignmentPosteriors())
model1g = value.getAlignmentPosteriorGrid();
if (trainer instanceof HMM && model1g != null) {
((HMM)trainer).setModel1Posteriors(model1g);
}
Alignment a = trainer.viterbiAlign(value, pr);
ReferenceAlignment ref = (ReferenceAlignment)value.getAlignment();
AlignmentPosteriorGrid ghmm = null;
AlignmentPosteriorGrid gmodel1 = null;
if (generatePosteriors) {
if (value.hasAlignmentPosteriors())
model1g = value.getAlignmentPosteriorGrid();
if (trainer instanceof HMM)
((HMM)trainer).setModel1Posteriors(model1g);
AlignmentPosteriorGrid g = trainer.computeAlignmentPosteriors(value);
if (value.hasAlignmentPosteriors()) {
//System.err.println(key + ": already has posteriors!");
model1g = value.getAlignmentPosteriorGrid();
//model1g.penalizeGarbageCollectors(2, 0.27f, 0.20f);
Alignment model1a = model1g.alignPosteriorThreshold(0.5f);