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

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

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


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


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

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

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

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


| std::ostream& operator<< | ( | std::ostream & | out, | |
| const PartialTranslOptColl & | possibleTranslation | |||
| ) | [friend] |
float Moses::PartialTranslOptColl::m_bestScore [protected] |
score of the best translation option
Definition at line 50 of file PartialTranslOptColl.h.
Referenced by AddNoPrune(), and PartialTranslOptColl().
std::vector<TranslationOption*> Moses::PartialTranslOptColl::m_list [protected] |
Definition at line 49 of file PartialTranslOptColl.h.
Referenced by Add(), AddNoPrune(), DetachAll(), GetList(), Moses::operator<<(), Prune(), and ~PartialTranslOptColl().
size_t Moses::PartialTranslOptColl::m_maxSize [protected] |
maximum number of translation options allowed
Definition at line 52 of file PartialTranslOptColl.h.
Referenced by Add(), PartialTranslOptColl(), and Prune().
size_t Moses::PartialTranslOptColl::m_totalPruned [protected] |
number of options pruned
Definition at line 53 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 51 of file PartialTranslOptColl.h.
Referenced by AddNoPrune(), PartialTranslOptColl(), and Prune().
1.5.9