summaryrefslogtreecommitdiff
path: root/decoder/lattice.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-02-19 04:27:55 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2012-02-19 04:27:55 -0500
commitc4ffa6df1fdd89e3db9c6d3829b7b84edac20bcf (patch)
tree695176a31796d634e81db3274859bad98d58b4c1 /decoder/lattice.cc
parent0498227db2f45bcf7ac44809106846866a6f85e1 (diff)
lbl preliminary clean up
Diffstat (limited to 'decoder/lattice.cc')
-rw-r--r--decoder/lattice.cc1
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));