Moses::ChartManager Class Reference

#include <ChartManager.h>

Inheritance diagram for Moses::ChartManager:

Inheritance graph
[legend]
Collaboration diagram for Moses::ChartManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChartManager (ttasksptr const &ttask)
 ~ChartManager ()
void Decode ()
 decode the sentence. This contains the main laps. Basically, the CKY++ algorithm
void AddXmlChartOptions ()
const ChartHypothesisGetBestHypothesis () const
 get best complete translation from the top chart cell.
void CalcNBest (size_t n, std::vector< boost::shared_ptr< ChartKBestExtractor::Derivation > > &nBestList, bool onlyDistinct=false) const
void OutputSearchGraphMoses (std::ostream &outputSearchGraphStream) const
void OutputSearchGraphAsHypergraph (std::ostream &outputSearchGraphStream) const
SentenceStatsGetSentenceStats () const
 debug data collected when decoding sentence
const ChartCellCollectionGetChartCellCollection () const
void CalcDecoderStatistics () const
void ResetSentenceStats (const InputType &source)
unsigned GetNextHypoId ()
 contigious hypo id for each input sentence. For debugging purposes
const ChartParserGetParser () const
void OutputBest (OutputCollector *collector) const
void OutputNBest (OutputCollector *collector) const
void OutputLatticeSamples (OutputCollector *collector) const
void OutputAlignment (OutputCollector *collector) const
void OutputDetailedTranslationReport (OutputCollector *collector) const
void OutputUnknowns (OutputCollector *collector) const
void OutputDetailedTreeFragmentsTranslationReport (OutputCollector *collector) const
void OutputWordGraph (OutputCollector *collector) const
void OutputSearchGraph (OutputCollector *collector) const
void OutputSearchGraphSLF () const


Detailed Description

Holds everything you need to decode 1 sentence with the hierachical/syntax decoder

Definition at line 44 of file ChartManager.h.


Constructor & Destructor Documentation

Moses::ChartManager::ChartManager ( ttasksptr const &  ttask  ) 

Definition at line 48 of file ChartManager.cpp.

Moses::ChartManager::~ChartManager (  ) 

Definition at line 57 of file ChartManager.cpp.

References end, and VERBOSE.


Member Function Documentation

void Moses::ChartManager::AddXmlChartOptions (  ) 

add specific translation options and hypotheses according to the XML override translation scheme. Doesn't seem to do anything about walls and zones.

Todo:
check walls & zones. Check that the implementation doesn't leak, xml options sometimes does if you're not careful

Definition at line 130 of file ChartManager.cpp.

References Moses::ChartCell::AddHypothesis(), Moses::ChartHypothesis::EvaluateWhenApplied(), Moses::ChartCellCollection::Get(), Moses::ChartTranslationOptions::GetSourceWordsRange(), Moses::InputType::GetXmlChartTranslationOptions(), IFVERBOSE, Moses::BaseManager::m_source, and range.

Referenced by Decode().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ChartManager::CalcDecoderStatistics (  )  const [inline, virtual]

Implements Moses::BaseManager.

Definition at line 127 of file ChartManager.h.

void Moses::ChartManager::CalcNBest ( size_t  n,
std::vector< boost::shared_ptr< ChartKBestExtractor::Derivation > > &  nBestList,
bool  onlyDistinct = false 
) const

Referenced by OutputNBest().

Here is the caller graph for this function:

void Moses::ChartManager::Decode (  )  [virtual]

const ChartHypothesis * Moses::ChartManager::GetBestHypothesis (  )  const

get best complete translation from the top chart cell.

Definition at line 156 of file ChartManager.cpp.

References Moses::ChartCellCollection::Get(), Moses::ChartCell::GetBestHypothesis(), Moses::InputType::GetSize(), Moses::BaseManager::m_source, NULL, and range.

Referenced by OutputAlignment(), OutputBest(), OutputDetailedTranslationReport(), and OutputDetailedTreeFragmentsTranslationReport().

Here is the call graph for this function:

Here is the caller graph for this function:

const ChartCellCollection& Moses::ChartManager::GetChartCellCollection (  )  const [inline]

Definition at line 123 of file ChartManager.h.

unsigned Moses::ChartManager::GetNextHypoId (  )  [inline]

contigious hypo id for each input sentence. For debugging purposes

Definition at line 135 of file ChartManager.h.

const ChartParser& Moses::ChartManager::GetParser (  )  const [inline]

Definition at line 139 of file ChartManager.h.

Referenced by OutputUnknowns().

Here is the caller graph for this function:

SentenceStats& Moses::ChartManager::GetSentenceStats (  )  const [inline]

debug data collected when decoding sentence

Definition at line 118 of file ChartManager.h.

Referenced by Moses::ChartHypothesisCollection::AddHypothesis(), and Moses::ChartHypothesisCollection::PruneToSize().

Here is the caller graph for this function:

void Moses::ChartManager::OutputAlignment ( OutputCollector collector  )  const [virtual]

Implements Moses::BaseManager.

Definition at line 486 of file ChartManager.cpp.

References GetBestHypothesis(), Moses::InputType::GetTranslationId(), Moses::BaseManager::m_source, NULL, and Moses::OutputCollector::Write().

Here is the call graph for this function:

void Moses::ChartManager::OutputBest ( OutputCollector collector  )  const [virtual]

Implements Moses::BaseManager.

Definition at line 306 of file ChartManager.cpp.

References GetBestHypothesis(), Moses::InputType::GetTranslationId(), and Moses::BaseManager::m_source.

Here is the call graph for this function:

void Moses::ChartManager::OutputDetailedTranslationReport ( OutputCollector collector  )  const [virtual]

Implements Moses::BaseManager.

Definition at line 588 of file ChartManager.cpp.

References GetBestHypothesis(), Moses::InputType::GetTranslationId(), and Moses::BaseManager::m_source.

Here is the call graph for this function:

void Moses::ChartManager::OutputDetailedTreeFragmentsTranslationReport ( OutputCollector collector  )  const [virtual]

void Moses::ChartManager::OutputLatticeSamples ( OutputCollector collector  )  const [inline, virtual]

Implements Moses::BaseManager.

Definition at line 146 of file ChartManager.h.

void Moses::ChartManager::OutputNBest ( OutputCollector collector  )  const [virtual]

void Moses::ChartManager::OutputSearchGraph ( OutputCollector collector  )  const [virtual]

Implements Moses::BaseManager.

Definition at line 769 of file ChartManager.cpp.

References Moses::InputType::GetTranslationId(), Moses::BaseManager::m_source, OutputSearchGraphMoses(), and Moses::OutputCollector::Write().

Here is the call graph for this function:

void Moses::ChartManager::OutputSearchGraphAsHypergraph ( std::ostream &  outputSearchGraphStream  )  const [virtual]

Output in (modified) Kenneth hypergraph format

Reimplemented from Moses::BaseManager.

Definition at line 293 of file ChartManager.cpp.

References Moses::BaseManager::options().

Here is the call graph for this function:

void Moses::ChartManager::OutputSearchGraphMoses ( std::ostream &  outputSearchGraphStream  )  const

"Moses" (osg) type format

Definition at line 299 of file ChartManager.cpp.

References Moses::InputType::GetTranslationId(), Moses::BaseManager::m_source, and Moses::BaseManager::options().

Referenced by OutputSearchGraph().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ChartManager::OutputSearchGraphSLF (  )  const [inline, virtual]

Implements Moses::BaseManager.

Definition at line 155 of file ChartManager.h.

void Moses::ChartManager::OutputUnknowns ( OutputCollector collector  )  const [virtual]

void Moses::ChartManager::OutputWordGraph ( OutputCollector collector  )  const [inline, virtual]

Implements Moses::BaseManager.

Definition at line 152 of file ChartManager.h.

void Moses::ChartManager::ResetSentenceStats ( const InputType source  )  [inline]

Definition at line 130 of file ChartManager.h.

Referenced by Decode().

Here is the caller graph for this function:


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

Generated on Thu Jul 6 00:32:54 2017 for Moses by  doxygen 1.5.9