Moses::PartialTranslOptColl Class Reference

#include <PartialTranslOptColl.h>

List of all members.

Public Member Functions

 PartialTranslOptColl ()
 ~PartialTranslOptColl ()
void AddNoPrune (const TranslationSystem *system, TranslationOption *partialTranslOpt)
void Add (const TranslationSystem *system, 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


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 28 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 57 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 ( const TranslationSystem system,
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 54 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 ( const TranslationSystem system,
TranslationOption partialTranslOpt 
)

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

Definition at line 38 of file PartialTranslOptColl.cpp.

References Moses::TranslationOption::CalcScore(), 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 71 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 66 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 76 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 73 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:


Member Data Documentation

score of the best translation option

Definition at line 48 of file PartialTranslOptColl.h.

Referenced by AddNoPrune(), and PartialTranslOptColl().

Definition at line 47 of file PartialTranslOptColl.h.

Referenced by Add(), AddNoPrune(), DetachAll(), GetList(), Prune(), and ~PartialTranslOptColl().

maximum number of translation options allowed

Definition at line 50 of file PartialTranslOptColl.h.

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

number of options pruned

Definition at line 51 of file PartialTranslOptColl.h.

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

score of the worse translation option

Definition at line 49 of file PartialTranslOptColl.h.

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


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

Generated on Wed Feb 8 23:04:10 2012 for Moses by  doxygen 1.5.9