Added struct Better for ranking TranslationOptions.

This commit is contained in:
Ulrich Germann 2015-02-05 23:34:34 +00:00
parent 693ddb0cf5
commit 68f418a12a

View File

@ -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 */