diff options
author | Chris Dyer <redpony@gmail.com> | 2009-12-08 21:38:55 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2009-12-08 21:38:55 -0500 |
commit | dc6930c00b4b276883280cff1ed6dcd9ddef03c7 (patch) | |
tree | d76d25baf66459d13da4faedffd7d6faba28a513 /src/ff.h | |
parent | 5082307f382a6563d4ffb97034137da4e362e629 (diff) |
LICENSE fixes, full support of lattice decoding
Diffstat (limited to 'src/ff.h')
-rw-r--r-- | src/ff.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -89,6 +89,21 @@ class WordPenalty : public FeatureFunction { const double value_; }; +class SourceWordPenalty : public FeatureFunction { + public: + SourceWordPenalty(const std::string& param); + protected: + virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, + const Hypergraph::Edge& edge, + const std::vector<const void*>& ant_contexts, + SparseVector<double>* features, + SparseVector<double>* estimated_features, + void* context) const; + private: + const int fid_; + const double value_; +}; + // this class is a set of FeatureFunctions that can be used to score, rescore, // etc. a (translation?) forest class ModelSet { |