#include <PartialTranslOptColl.h>
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 |
Definition at line 44 of file PartialTranslOptColl.h.
| 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.

| Moses::PartialTranslOptColl::~PartialTranslOptColl | ( | ) | [inline] |
destructor, cleans out list
Definition at line 57 of file PartialTranslOptColl.h.
References m_list, and Moses::RemoveAllInColl().

| 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().


| 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().


| 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().

| 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().

| 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().

| 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().


float Moses::PartialTranslOptColl::m_bestScore [protected] |
score of the best translation option
Definition at line 48 of file PartialTranslOptColl.h.
Referenced by AddNoPrune(), and PartialTranslOptColl().
std::vector<TranslationOption*> Moses::PartialTranslOptColl::m_list [protected] |
Definition at line 47 of file PartialTranslOptColl.h.
Referenced by Add(), AddNoPrune(), DetachAll(), GetList(), Prune(), and ~PartialTranslOptColl().
size_t Moses::PartialTranslOptColl::m_maxSize [protected] |
maximum number of translation options allowed
Definition at line 50 of file PartialTranslOptColl.h.
Referenced by Add(), PartialTranslOptColl(), and Prune().
size_t Moses::PartialTranslOptColl::m_totalPruned [protected] |
number of options pruned
Definition at line 51 of file PartialTranslOptColl.h.
Referenced by AddNoPrune(), GetPrunedCount(), PartialTranslOptColl(), and Prune().
float Moses::PartialTranslOptColl::m_worstScore [protected] |
score of the worse translation option
Definition at line 49 of file PartialTranslOptColl.h.
Referenced by AddNoPrune(), PartialTranslOptColl(), and Prune().
1.5.9