diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-18 08:23:22 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-18 08:23:22 +0400 |
commit | a4f5879fef2d7150b9e17f32937c2d54ff7eda2f (patch) | |
tree | ba768449338e97b3cbd813da808774823cf29b5a /moses/FF/ConstrainedDecoding.h | |
parent | 68974c9f20bd0bfe36582f3b5615c24e4bffc489 (diff) |
take out -constraint from Parameter. Now handled exclusively in FF
Diffstat (limited to 'moses/FF/ConstrainedDecoding.h')
-rw-r--r-- | moses/FF/ConstrainedDecoding.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/moses/FF/ConstrainedDecoding.h b/moses/FF/ConstrainedDecoding.h index 8c9cd31b1..e75d5d0fe 100644 --- a/moses/FF/ConstrainedDecoding.h +++ b/moses/FF/ConstrainedDecoding.h @@ -1,6 +1,7 @@ #pragma once #include <string> +#include <map> #include "StatefulFeatureFunction.h" #include "FFState.h" #include "moses/Phrase.h" @@ -26,6 +27,8 @@ protected: Phrase m_outputPhrase; }; +////////////////////////////////////////////////////////////////// + class ConstrainedDecoding : public StatefulFeatureFunction { public: @@ -33,8 +36,11 @@ public: :StatefulFeatureFunction("ConstrainedDecoding", 1, line) { m_tuneable = false; + ReadParameters(); } + void Load(); + bool IsUseable(const FactorMask &mask) const { return true; } @@ -64,6 +70,12 @@ public: std::vector<float> DefaultWeights() const; + void SetParameter(const std::string& key, const std::string& value); + +protected: + std::string m_path; + std::map<long,Phrase> m_constraints; + }; |