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
commite5c17041c0596994a60fe984c71b0a058a4aec47 (patch)
tree78615fa150077e01bda8951a0a5828a93640dcf7 /decoder/lattice.cc
parent7c6e93002bb0d346b040e558f2b35984e00d9434 (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));