Moses::PartialTranslOptColl Class Reference

#include <PartialTranslOptColl.h>

List of all members.

Public Member Functions

 PartialTranslOptColl ()
 ~PartialTranslOptColl ()
void AddNoPrune (TranslationOption *partialTranslOpt)
void Add (TranslationOption *partialTranslOpt)
void Prune ()
const std::vector
< TranslationOption * > & 
GetList () const
void DetachAll ()
size_t GetPrunedCount ()

Protected Attributes

std::vector< TranslationOption * > m_list
float m_bestScore
float m_worstScore
size_t m_maxSize
size_t m_totalPruned

Friends

std::ostream & operator<< (std::ostream &out, const PartialTranslOptColl &possibleTranslation)


Detailed Description

Contains partial translation options, while these are constructed in the class TranslationOption. The factored translation model allows for multiple translation and generation steps during a single Hypothesis expansion. For efficiency, all these expansions are precomputed and stored as TranslationOption. The expansion process itself may be still explode, so efficient handling of partial translation options during expansion is required. This class assists in this tasks by implementing pruning. This implementation is similar to the one in HypothesisStack.

Definition at line 44 of file PartialTranslOptColl.h.


Constructor & Destructor Documentation

Moses::PartialTranslOptColl::PartialTranslOptColl (  ) 

constructor, intializes counters and thresholds

Definition at line 31 of file PartialTranslOptColl.cpp.

References Moses::StaticData::GetMaxNoPartTransOpt(), Moses::StaticData::Instance(), m_bestScore, m_maxSize, m_totalPruned, and m_worstScore.

Here is the call graph for this function:

Moses::PartialTranslOptColl::~PartialTranslOptColl (  )  [inline]

destructor, cleans out list

Definition at line 59 of file PartialTranslOptColl.h.

References m_list, and Moses::RemoveAllInColl().

Here is the call graph for this function:


Member Function Documentation

void Moses::PartialTranslOptColl::Add ( TranslationOption partialTranslOpt  ) 

add a partial translation option to the collection, prune if necessary. This is done similar to the Prune() in TranslationOptionCollection

Definition at line 56 of file PartialTranslOptColl.cpp.

References AddNoPrune(), m_list, m_maxSize, and Prune().

Referenced by Moses::DecodeStepTranslation::Process(), Moses::DecodeStepGeneration::Process(), and Moses::DecodeStepTranslation::ProcessInitialTranslation().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::PartialTranslOptColl::AddNoPrune ( TranslationOption partialTranslOpt  ) 

add a partial translation option to the collection (without pruning)

Definition at line 41 of file PartialTranslOptColl.cpp.

References Moses::TranslationOption::GetFutureScore(), m_bestScore, m_list, m_totalPruned, and m_worstScore.

Referenced by Add().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::PartialTranslOptColl::DetachAll (  )  [inline]

clear out the list

Definition at line 73 of file PartialTranslOptColl.h.

References m_list.

Referenced by Moses::TranslationOptionCollection::CreateTranslationOptionsForRange().

Here is the caller graph for this function:

const std::vector<TranslationOption*>& Moses::PartialTranslOptColl::GetList (  )  const [inline]

returns list of translation options

Definition at line 68 of file PartialTranslOptColl.h.

References m_list.

Referenced by Moses::TranslationOptionCollection::CreateTranslationOptionsForRange().

Here is the caller graph for this function:

size_t Moses::PartialTranslOptColl::GetPrunedCount (  )  [inline]

return number of pruned partial hypotheses

Definition at line 78 of file PartialTranslOptColl.h.

References m_totalPruned.

Referenced by Moses::TranslationOptionCollection::CreateTranslationOptionsForRange().

Here is the caller graph for this function:

void Moses::PartialTranslOptColl::Prune (  ) 

pruning, remove partial translation options, if list too big

Definition at line 75 of file PartialTranslOptColl.cpp.

References Moses::ComparePartialTranslationOption(), m_list, m_maxSize, m_totalPruned, and m_worstScore.

Referenced by Add().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const PartialTranslOptColl possibleTranslation 
) [friend]


Member Data Documentation

score of the best translation option

Definition at line 50 of file PartialTranslOptColl.h.

Referenced by AddNoPrune(), and PartialTranslOptColl().

maximum number of translation options allowed

Definition at line 52 of file PartialTranslOptColl.h.

Referenced by Add(), PartialTranslOptColl(), and Prune().

number of options pruned

Definition at line 53 of file PartialTranslOptColl.h.

Referenced by AddNoPrune(), GetPrunedCount(), PartialTranslOptColl(), and Prune().

score of the worse translation option

Definition at line 51 of file PartialTranslOptColl.h.

Referenced by AddNoPrune(), PartialTranslOptColl(), and Prune().


The documentation for this class was generated from the following files:

Generated on Wed Nov 26 00:32:04 2014 for Moses by  doxygen 1.5.9