diff options
author | Rico Sennrich <rico.sennrich@gmx.ch> | 2014-09-17 17:14:11 +0400 |
---|---|---|
committer | Rico Sennrich <rico.sennrich@gmx.ch> | 2014-09-22 13:49:20 +0400 |
commit | 3d00e5dc8ceb19d619e2ed2d0aa3f1b2a160944a (patch) | |
tree | 9d6a6fc32490d47aa0291c52285f53bf8d5abfac /mert/HopeFearDecoder.h | |
parent | 6810b225ccd673c7684ab9b62e0daa0a7af054f3 (diff) |
basic support for more metrics with kbmira
metrics need getReferenceLength (for background smoothing) to work with kbmira
Diffstat (limited to 'mert/HopeFearDecoder.h')
-rw-r--r-- | mert/HopeFearDecoder.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mert/HopeFearDecoder.h b/mert/HopeFearDecoder.h index 694a3217e..d1881eeb2 100644 --- a/mert/HopeFearDecoder.h +++ b/mert/HopeFearDecoder.h @@ -37,6 +37,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA namespace MosesTuning { +class Scorer; + /** To be filled in by the decoder */ struct HopeFearData { MiraFeatureVector modelFeatures; @@ -60,6 +62,8 @@ public: virtual void next() = 0; virtual bool finished() = 0; + virtual ~HopeFearDecoder() {}; + /** * Calculate hope, fear and model hypotheses **/ @@ -76,6 +80,8 @@ public: /** Calculate bleu on training set */ ValType Evaluate(const AvgWeightVector& wv); +protected: + Scorer* scorer_; }; @@ -86,7 +92,8 @@ public: const std::vector<std::string>& scoreFiles, bool streaming, bool no_shuffle, - bool safe_hope + bool safe_hope, + Scorer* scorer ); virtual void reset(); @@ -120,7 +127,8 @@ public: bool no_shuffle, bool safe_hope, size_t hg_pruning, - const MiraWeightVector& wv + const MiraWeightVector& wv, + Scorer* scorer_ ); virtual void reset(); |