From fa47b549e5ac7c16dce9e40d52328ffd51b60dc6 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 16 Apr 2012 00:18:20 -0400 Subject: rst algorithm --- rst_parser/arc_factored.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rst_parser/arc_factored.h') diff --git a/rst_parser/arc_factored.h b/rst_parser/arc_factored.h index a95f8230..d9a0bb24 100644 --- a/rst_parser/arc_factored.h +++ b/rst_parser/arc_factored.h @@ -28,10 +28,12 @@ struct ArcFeatureFunction; class ArcFactoredForest { public: ArcFactoredForest() : num_words_() {} - explicit ArcFactoredForest(short num_words) { + explicit ArcFactoredForest(short num_words) : num_words_(num_words) { resize(num_words); } + unsigned size() const { return num_words_; } + void resize(unsigned num_words) { num_words_ = num_words; root_edges_.clear(); -- cgit v1.2.3