diff options
author | Patrick Simianer <p@simianer.de> | 2014-01-13 18:30:58 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-01-13 18:30:58 +0100 |
commit | 58be95f557d2f6a006cc98a23de98125e6b83a32 (patch) | |
tree | 2186401266f3242a3f793371dbac2764b64b5f00 /decoder/ff_rules.cc | |
parent | 411ad2eb4a09ef04a7529bc1a178e83f624c6569 (diff) |
remove duplicate word alignment features
Diffstat (limited to 'decoder/ff_rules.cc')
-rw-r--r-- | decoder/ff_rules.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/decoder/ff_rules.cc b/decoder/ff_rules.cc index 7bccf084..9533caed 100644 --- a/decoder/ff_rules.cc +++ b/decoder/ff_rules.cc @@ -69,28 +69,6 @@ void RuleIdentityFeatures::TraversalFeaturesImpl(const SentenceMetadata& smeta, features->add_value(it->second, 1); } -RuleWordAlignmentFeatures::RuleWordAlignmentFeatures(const std::string& param) { -} - -void RuleWordAlignmentFeatures::PrepareForInput(const SentenceMetadata& smeta) { -} - -void RuleWordAlignmentFeatures::TraversalFeaturesImpl(const SentenceMetadata& smeta, - const Hypergraph::Edge& edge, - const vector<const void*>& ant_contexts, - SparseVector<double>* features, - SparseVector<double>* estimated_features, - void* context) const { - const TRule& rule = *edge.rule_; - ostringstream os; - vector<AlignmentPoint> als = rule.als(); - std::vector<AlignmentPoint>::const_iterator xx = als.begin(); - for (; xx != als.end(); ++xx) { - os << "WA:" << TD::Convert(rule.f_[xx->s_]) << ":" << TD::Convert(rule.e_[xx->t_]); - } - features->add_value(FD::Convert(Escape(os.str())), 1); -} - RuleSourceBigramFeatures::RuleSourceBigramFeatures(const std::string& param) { } |