mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
Added struct Better for ranking TranslationOptions.
This commit is contained in:
parent
693ddb0cf5
commit
68f418a12a
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user