#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 |
Friends | |
| std::ostream & | operator<< (std::ostream &, const TargetPhraseCollection &) |
Definition at line 34 of file TargetPhraseCollection.h.
| typedef std::vector<TargetPhrase*>::const_iterator Moses::TargetPhraseCollection::const_iterator |
Definition at line 44 of file TargetPhraseCollection.h.
| typedef std::vector<TargetPhrase*>::iterator Moses::TargetPhraseCollection::iterator |
Definition at line 43 of file TargetPhraseCollection.h.
| Moses::TargetPhraseCollection::~TargetPhraseCollection | ( | ) | [inline] |
Definition at line 59 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 77 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::ChartTranslationOptionList::AddPhraseOOV(), Moses::PhraseDictionaryMultiModel::CreateTargetPhraseCollectionLinearInterpolation(), Moses::PhraseDictionaryDynSuffixArray::GetTargetPhraseCollection(), Moses::PhraseDictionaryCompact::GetTargetPhraseCollection(), Moses::PhraseDictionaryFuzzyMatch::InitializeForInput(), Moses::RuleTableLoaderStandard::Load(), Moses::PDTAimp::PruneTargetCandidates(), and Moses::TreeInput::Read().

| const_iterator Moses::TargetPhraseCollection::begin | ( | ) | const [inline] |
| iterator Moses::TargetPhraseCollection::begin | ( | ) | [inline] |
Definition at line 46 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::ChartTranslationOptions::CalcEstimateOfBestScore(), Moses::PhraseDictionaryMultiModel::CollectSufficientStatistics(), Moses::PhraseDictionaryMultiModelCounts::GetTargetCount(), main(), Moses::operator<<(), 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 49 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::PhraseDictionaryMultiModel::CollectSufficientStatistics(), main(), Moses::operator<<(), Moses::DecodeStepTranslation::Process(), and Moses::DecodeStepTranslation::ProcessInitialTranslation().

| const std::vector<TargetPhrase*>& Moses::TargetPhraseCollection::GetCollection | ( | ) | const [inline] |
Definition at line 63 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::ChartManager::AddXmlChartOptions().

| size_t Moses::TargetPhraseCollection::GetSize | ( | ) | const [inline] |
number of target phrases in this collection
Definition at line 69 of file TargetPhraseCollection.h.
References m_collection.
Referenced by Moses::PhraseDictionaryMultiModel::CollectSufficientStatistics(), Moses::DecodeStepTranslation::Process(), and Moses::DecodeStepTranslation::ProcessInitialTranslation().

| bool Moses::TargetPhraseCollection::IsEmpty | ( | ) | const [inline] |
wether collection has any phrases
Definition at line 73 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::PhraseDictionaryMultiModelCounts::GetTargetPhraseCollection(), Moses::PhraseDictionaryMultiModel::GetTargetPhraseCollection(), Moses::PhraseDictionaryDynSuffixArray::GetTargetPhraseCollection(), and Prune().

| 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::ostream& operator<< | ( | std::ostream & | out, | |
| const TargetPhraseCollection & | obj | |||
| ) | [friend] |
Definition at line 77 of file TargetPhraseCollection.cpp.
std::vector<TargetPhrase*> Moses::TargetPhraseCollection::m_collection [protected] |
Definition at line 39 of file TargetPhraseCollection.h.
Referenced by Add(), begin(), end(), GetCollection(), GetSize(), IsEmpty(), NthElement(), Prune(), Sort(), and ~TargetPhraseCollection().
1.5.9