summaryrefslogtreecommitdiff
path: root/rst_parser/arc_factored.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-04-16 22:42:24 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-04-16 22:42:24 -0400
commit23dcec445852d140291bba4a8c40bb0e47e9a266 (patch)
tree9606eb3d4e3d055e1086f6988c6f80cc1b34121f /rst_parser/arc_factored.h
parent964b58ae8302e0fadcceb982c92d49ab25538cd5 (diff)
refactor some code, simplify, fix typos
Diffstat (limited to 'rst_parser/arc_factored.h')
-rw-r--r--rst_parser/arc_factored.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/rst_parser/arc_factored.h b/rst_parser/arc_factored.h
index a271c8d4..c5481d80 100644
--- a/rst_parser/arc_factored.h
+++ b/rst_parser/arc_factored.h
@@ -17,14 +17,15 @@ struct TaggedSentence {
std::vector<WordID> pos;
};
-struct ArcFeatureFunction;
+struct ArcFeatureFunctions;
struct EdgeSubset {
EdgeSubset() {}
std::vector<short> roots; // unless multiroot trees are supported, this
// will have a single member
std::vector<std::pair<short, short> > h_m_pairs; // h,m start at 0
+ // assumes ArcFeatureFunction::PrepareForInput has already been called
void ExtractFeatures(const TaggedSentence& sentence,
- const std::vector<boost::shared_ptr<ArcFeatureFunction> >& ffs,
+ const ArcFeatureFunctions& ffs,
SparseVector<double>* features) const;
};
@@ -74,7 +75,7 @@ class ArcFactoredForest {
// set eges_[*].features
void ExtractFeatures(const TaggedSentence& sentence,
- const std::vector<boost::shared_ptr<ArcFeatureFunction> >& ffs);
+ const ArcFeatureFunctions& ffs);
const Edge& operator()(short h, short m) const {
return h >= 0 ? edges_(h, m) : root_edges_[m];