diff options
Diffstat (limited to 'decoder')
| -rw-r--r-- | decoder/lattice.cc | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/decoder/lattice.cc b/decoder/lattice.cc index e3631e59..89da3cd0 100644 --- a/decoder/lattice.cc +++ b/decoder/lattice.cc @@ -46,6 +46,7 @@ void LatticeTools::ConvertTextToLattice(const string& text, Lattice* pl) {    Lattice& l = *pl;    vector<WordID> ids;    TD::ConvertSentence(text, &ids); +  l.clear();    l.resize(ids.size());    for (int i = 0; i < l.size(); ++i)      l[i].push_back(LatticeArc(ids[i], 0.0, 1)); | 
