Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/moses
diff options
context:
space:
mode:
authorUlrich Germann <ugermann@inf.ed.ac.uk>2015-02-06 02:34:34 +0300
committerUlrich Germann <ugermann@inf.ed.ac.uk>2015-02-06 02:34:34 +0300
commit68f418a12a26959d13a9059ec4edfc6a0a786555 (patch)
tree82a6e924e5bcf636121987971c13e55a4466a309 /moses
parent693ddb0cf55b406dd194f0440a13f5be7b9c3905 (diff)
Added struct Better for ranking TranslationOptions.
Diffstat (limited to 'moses')
-rw-r--r--moses/TranslationOption.h11
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 */