From dc6930c00b4b276883280cff1ed6dcd9ddef03c7 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 8 Dec 2009 21:38:55 -0500 Subject: LICENSE fixes, full support of lattice decoding --- src/ff.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/ff.h') diff --git a/src/ff.h b/src/ff.h index c97e2fe2..e962b4ba 100644 --- a/src/ff.h +++ b/src/ff.h @@ -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& ant_contexts, + SparseVector* features, + SparseVector* 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 { -- cgit v1.2.3