diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-02-06 02:34:34 +0300 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-02-06 02:34:34 +0300 |
commit | 68f418a12a26959d13a9059ec4edfc6a0a786555 (patch) | |
tree | 82a6e924e5bcf636121987971c13e55a4466a309 /moses | |
parent | 693ddb0cf55b406dd194f0440a13f5be7b9c3905 (diff) |
Added struct Better for ranking TranslationOptions.
Diffstat (limited to 'moses')
-rw-r--r-- | moses/TranslationOption.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/moses/TranslationOption.h b/moses/TranslationOption.h index 9d2e10780..1f0a15a0f 100644 --- a/moses/TranslationOption.h +++ b/moses/TranslationOption.h @@ -1,3 +1,4 @@ +// -*- c++ -*- // $Id$ /*********************************************************************** @@ -74,6 +75,16 @@ protected: _ScoreCacheMap m_lexReorderingScores; public: + struct Better + { + bool operator()(TranslationOption const& a, TranslationOption const& b) const + { return a.GetFutureScore() > b.GetFutureScore(); } + + bool operator()(TranslationOption const* a, TranslationOption const* b) const + { return a->GetFutureScore() > b->GetFutureScore(); } + }; + + explicit TranslationOption(); // For initial hypo that does translate nothing /** constructor. Used by initial translation step */ |