summaryrefslogtreecommitdiff
path: root/rst_parser/dep_training.cc
diff options
context:
space:
mode:
Diffstat (limited to 'rst_parser/dep_training.cc')
-rw-r--r--rst_parser/dep_training.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/rst_parser/dep_training.cc b/rst_parser/dep_training.cc
index e26505ec..ef97798b 100644
--- a/rst_parser/dep_training.cc
+++ b/rst_parser/dep_training.cc
@@ -18,6 +18,10 @@ static void ParseInstance(const string& line, int start, TrainingInstance* out,
TrainingInstance& cur = *out;
TaggedSentence& ts = cur.ts;
EdgeSubset& tree = cur.tree;
+ ts.pos.clear();
+ ts.words.clear();
+ tree.roots.clear();
+ tree.h_m_pairs.clear();
assert(obj.is<picojson::object>());
const picojson::object& d = obj.get<picojson::object>();
const picojson::array& ta = d.find("tokens")->second.get<picojson::array>();