Moses::TargetPhraseCollection Class Reference

a list of target phrases that is translated from the same source phrase More...

#include <TargetPhraseCollection.h>

List of all members.

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)
void Clear ()

Protected Attributes

std::vector< TargetPhrase * > m_collection

Friends

std::ostream & operator<< (std::ostream &, const TargetPhraseCollection &)


Detailed Description

a list of target phrases that is translated from the same source phrase

Definition at line 34 of file TargetPhraseCollection.h.


Member Typedef Documentation

Definition at line 44 of file TargetPhraseCollection.h.

Definition at line 43 of file TargetPhraseCollection.h.


Constructor & Destructor Documentation

Moses::TargetPhraseCollection::~TargetPhraseCollection (  )  [inline]

Definition at line 59 of file TargetPhraseCollection.h.

References m_collection, and Moses::RemoveAllInColl().

Here is the call graph for this function:


Member Function Documentation

void Moses::TargetPhraseCollection::Add ( TargetPhrase targetPhrase  )  [inline]

const_iterator Moses::TargetPhraseCollection::begin (  )  const [inline]

Definition at line 52 of file TargetPhraseCollection.h.

References m_collection.

iterator Moses::TargetPhraseCollection::begin (  )  [inline]

void Moses::TargetPhraseCollection::Clear (  )  [inline]

Definition at line 85 of file TargetPhraseCollection.h.

References m_collection, and Moses::RemoveAllInColl().

Here is the call graph for this function:

const_iterator Moses::TargetPhraseCollection::end (  )  const [inline]

Definition at line 55 of file TargetPhraseCollection.h.

References m_collection.

iterator Moses::TargetPhraseCollection::end (  )  [inline]

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

Here is the caller graph for this function:

size_t Moses::TargetPhraseCollection::GetSize (  )  const [inline]

number of target phrases in this collection

Definition at line 71 of file TargetPhraseCollection.h.

References m_collection.

Referenced by Moses::PhraseDictionaryMultiModel::CollectSufficientStatistics(), Moses::DecodeStepTranslation::Process(), and Moses::DecodeStepTranslation::ProcessInitialTranslation().

Here is the caller graph for this function:

bool Moses::TargetPhraseCollection::IsEmpty (  )  const [inline]

wether collection has any phrases

Definition at line 75 of file TargetPhraseCollection.h.

References m_collection.

Referenced by Moses::ChartTranslationOptionList::Add(), Moses::PDTAimp::CacheSource(), Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection(), and Moses::PDTAimp::GetTargetPhraseCollection().

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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::PhraseDictionaryNodeMemory::Prune().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::TargetPhraseCollection::Sort ( bool  adhereTableLimit,
size_t  tableLimit 
)

Definition at line 58 of file TargetPhraseCollection.cpp.

References m_collection.

Referenced by Moses::PhraseDictionaryNodeMemory::Sort().

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const TargetPhraseCollection obj 
) [friend]

Definition at line 77 of file TargetPhraseCollection.cpp.


Member Data Documentation


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

Generated on Tue Sep 2 00:32:13 2014 for Moses by  doxygen 1.5.9