Example #1
0
void M2MFstAligner::entry2alignfstnoinit( vector<string> seq1, vector<string> seq2, int nbest, string lattice ){
  /*
    There is a pre-trained alignment model, so just use the model parameters to weight the alignment arcs.
    This could probably be merged with "entry2alignfst()", but we'll leave it for now.
  */
  VectorFst<LogArc> fst;
  Sequences2FSTNoInit( &fst, &seq1, &seq2 );
  fsas.push_back(fst);
  return;
}
Example #2
0
vector<PathData> M2MFstAligner::entry2alignfstnoinit(vector<string>
        seq1,
        vector<string>
        seq2, int nbest,
        string lattice)
{
    VectorFst<LogArc> fst;
    Sequences2FSTNoInit(&fst, &seq1, &seq2);
    if (lattice.compare("") != 0)
        fst.Write(lattice);
    return write_alignment(fst, nbest);
}