#include <TargetPhraseCollection.h>
Public Types | |
| typedef std::vector < TargetPhrase * >::iterator | iterator |
| typedef std::vector < TargetPhrase * > ::const_iterator | const_iterator |
Public Member Functions | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| ~TargetPhraseCollection () | |
| const std::vector < TargetPhrase * > & | GetCollection () const |
| void | NthElement (size_t tableLimit) |
| divide collection into 2 buckets using std::nth_element, the top & bottom according to table limit | |
| size_t | GetSize () const |
| number of target phrases in this collection | |
| bool | IsEmpty () const |
| wether collection has any phrases | |
| void | Add (TargetPhrase *targetPhrase) |
| add a new entry into collection | |
| void | Prune (bool adhereTableLimit, size_t tableLimit) |
| void | Sort (bool adhereTableLimit, size_t tableLimit) |
Protected Attributes | |
| std::vector< TargetPhrase * > | m_collection |
Definition at line 33 of file TargetPhraseCollection.h.
| typedef std::vector<TargetPhrase*>::const_iterator Moses::TargetPhraseCollection::const_iterator |
Definition at line 41 of file TargetPhraseCollection.h.
| typedef std::vector<TargetPhrase*>::iterator Moses::TargetPhraseCollection::iterator |
Definition at line 40 of file TargetPhraseCollection.h.
| Moses::TargetPhraseCollection::~TargetPhraseCollection | ( | ) | [inline] |
Definition at line 56 of file TargetPhraseCollection.h.
References m_collection, and Moses::RemoveAllInColl().

| void Moses::TargetPhraseCollection::Add | ( | TargetPhrase * | targetPhrase | ) | [inline] |
add a new entry into collection
Definition at line 74 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::PhraseDictionaryDynSuffixArray::GetTargetPhraseCollection(), Moses::RuleTableLoaderStandard::Load(), Moses::ChartTranslationOptionCollection::ProcessOneUnknownWord(), and Moses::PDTAimp::PruneTargetCandidates().

| const_iterator Moses::TargetPhraseCollection::begin | ( | ) | const [inline] |
| iterator Moses::TargetPhraseCollection::begin | ( | ) | [inline] |
Definition at line 43 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::ChartTranslationOption::CalcEstimateOfBestScore(), Moses::DecodeStepTranslation::Process(), Moses::DecodeStepTranslation::ProcessInitialTranslation(), and Moses::PDTAimp::PruneTargetCandidates().

| const_iterator Moses::TargetPhraseCollection::end | ( | ) | const [inline] |
| iterator Moses::TargetPhraseCollection::end | ( | ) | [inline] |
Definition at line 46 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::DecodeStepTranslation::Process(), and Moses::DecodeStepTranslation::ProcessInitialTranslation().

| const std::vector<TargetPhrase*>& Moses::TargetPhraseCollection::GetCollection | ( | ) | const [inline] |
| size_t Moses::TargetPhraseCollection::GetSize | ( | ) | const [inline] |
number of target phrases in this collection
Definition at line 66 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::DecodeStepTranslation::Process(), and Moses::DecodeStepTranslation::ProcessInitialTranslation().

| bool Moses::TargetPhraseCollection::IsEmpty | ( | ) | const [inline] |
wether collection has any phrases
Definition at line 70 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::ChartTranslationOptionList::Add(), Moses::PDTAimp::CacheSource(), Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection(), and Moses::PDTAimp::GetTargetPhraseCollection().

| void Moses::TargetPhraseCollection::NthElement | ( | size_t | tableLimit | ) |
divide collection into 2 buckets using std::nth_element, the top & bottom according to table limit
Definition at line 36 of file TargetPhraseCollection.cpp.
References m_collection.
Referenced by Moses::PhraseDictionaryDynSuffixArray::GetTargetPhraseCollection(), Prune(), and Moses::PhraseDictionaryNode::Sort().

| void Moses::TargetPhraseCollection::Prune | ( | bool | adhereTableLimit, | |
| size_t | tableLimit | |||
| ) |
Definition at line 45 of file TargetPhraseCollection.cpp.
References m_collection, and NthElement().
Referenced by Moses::PhraseDictionaryNodeSCFG::Prune().


| void Moses::TargetPhraseCollection::Sort | ( | bool | adhereTableLimit, | |
| size_t | tableLimit | |||
| ) |
Definition at line 58 of file TargetPhraseCollection.cpp.
References m_collection.
Referenced by Moses::PhraseDictionaryNodeSCFG::Sort().

std::vector<TargetPhrase*> Moses::TargetPhraseCollection::m_collection [protected] |
Definition at line 36 of file TargetPhraseCollection.h.
Referenced by Add(), begin(), end(), GetCollection(), GetSize(), IsEmpty(), NthElement(), Prune(), Sort(), and ~TargetPhraseCollection().
1.5.9