Moses::SearchNormal Class Reference

#include <SearchNormal.h>

Inheritance diagram for Moses::SearchNormal:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SearchNormal (Manager &manager, const InputType &source, const TranslationOptionCollection &transOptColl)
 ~SearchNormal ()
void ProcessSentence ()
void OutputHypoStackSize ()
void OutputHypoStack (int stack)
virtual const std::vector
< HypothesisStack * > & 
GetHypothesisStacks () const
virtual const HypothesisGetBestHypothesis () const

Protected Member Functions

void ProcessOneHypothesis (const Hypothesis &hypothesis)
void ExpandAllHypotheses (const Hypothesis &hypothesis, size_t startPos, size_t endPos)
virtual void ExpandHypothesis (const Hypothesis &hypothesis, const TranslationOption &transOpt, float expectedScore)

Protected Attributes

const InputTypem_source
std::vector< HypothesisStack * > m_hypoStackColl
TargetPhrase m_initialTargetPhrase
clock_t m_start
size_t interrupted_flag
HypothesisStackNormalactual_hypoStack
const TranslationOptionCollectionm_transOptColl


Detailed Description

Functions and variables you need to decoder an input using the phrase-based decoder (NO cube-pruning) Instantiated by the Manager class

Definition at line 20 of file SearchNormal.h.


Constructor & Destructor Documentation

Moses::SearchNormal::SearchNormal ( Manager manager,
const InputType source,
const TranslationOptionCollection transOptColl 
)

Moses::SearchNormal::~SearchNormal (  ) 

Definition at line 49 of file SearchNormal.cpp.

References m_hypoStackColl, and Moses::RemoveAllInColl().

Here is the call graph for this function:


Member Function Documentation

void Moses::SearchNormal::ExpandAllHypotheses ( const Hypothesis hypothesis,
size_t  startPos,
size_t  endPos 
) [protected]

Expand a hypothesis given a list of translation options

Parameters:
hypothesis hypothesis to be expanded upon
startPos first word position of span covered
endPos last word position of span covered

Definition at line 258 of file SearchNormal.cpp.

References Moses::TranslationOptionList::begin(), Moses::SquareMatrix::CalcFutureScore(), Moses::TranslationOptionList::end(), ExpandHypothesis(), Moses::TranslationOptionCollection::GetFutureScore(), Moses::Hypothesis::GetScore(), Moses::TranslationOptionCollection::GetTranslationOptionList(), Moses::Hypothesis::GetWordsBitmap(), Moses::StaticData::Instance(), and m_transOptColl.

Referenced by ProcessOneHypothesis().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::SearchNormal::ExpandHypothesis ( const Hypothesis hypothesis,
const TranslationOption transOpt,
float  expectedScore 
) [protected, virtual]

Expand one hypothesis with a translation option. this involves initial creation, scoring and adding it to the proper stack

Parameters:
hypothesis hypothesis to be expanded upon
transOpt translation option (phrase translation) that is applied to create the new hypothesis
expectedScore base score for early discarding (base hypothesis score plus future score estimation)

Reimplemented in Moses::SearchNormalBatch.

Definition at line 288 of file SearchNormal.cpp.

References Moses::SentenceStats::AddEarlyDiscarded(), Moses::SentenceStats::AddNotBuilt(), Moses::SentenceStats::AddTimeBuildHyp(), Moses::SentenceStats::AddTimeStack(), Moses::Hypothesis::CreateNext(), Moses::Hypothesis::Evaluate(), FREEHYPO, Moses::StaticData::GetEarlyDiscardingThreshold(), Moses::TranslationOption::GetEndPos(), Moses::TranslationOption::GetFutureScore(), Moses::TranslationOptionCollection::GetFutureScore(), Moses::WordsBitmap::GetIDPlus(), Moses::StaticData::GetMinHypoStackDiversity(), Moses::WordsBitmap::GetNumWordsCovered(), Moses::Manager::GetSentenceStats(), Moses::TranslationOption::GetSize(), Moses::TranslationOption::GetStartPos(), Moses::Hypothesis::GetWordsBitmap(), IFVERBOSE, Moses::StaticData::Instance(), Moses::Search::m_constraint, m_hypoStackColl, Moses::Search::m_manager, m_transOptColl, NULL, Moses::Hypothesis::PrintHypothesis(), Moses::stats, and Moses::StaticData::UseEarlyDiscarding().

Referenced by ExpandAllHypotheses().

Here is the call graph for this function:

Here is the caller graph for this function:

const Hypothesis * Moses::SearchNormal::GetBestHypothesis (  )  const [virtual]

Find best hypothesis on the last stack. This is the end point of the best translation, which can be traced back from here

Implements Moses::Search.

Definition at line 377 of file SearchNormal.cpp.

References actual_hypoStack, Moses::HypothesisStackNormal::GetBestHypothesis(), interrupted_flag, and m_hypoStackColl.

Here is the call graph for this function:

const std::vector< HypothesisStack * > & Moses::SearchNormal::GetHypothesisStacks (  )  const [virtual]

Implements Moses::Search.

Definition at line 368 of file SearchNormal.cpp.

References m_hypoStackColl.

void Moses::SearchNormal::OutputHypoStack ( int  stack  ) 

void Moses::SearchNormal::OutputHypoStackSize (  ) 

Logging of hypothesis stack sizes

Definition at line 391 of file SearchNormal.cpp.

References m_hypoStackColl, and TRACE_ERR.

Referenced by Moses::SearchNormalBatch::ProcessSentence(), and ProcessSentence().

Here is the caller graph for this function:

void Moses::SearchNormal::ProcessOneHypothesis ( const Hypothesis hypothesis  )  [protected]

void Moses::SearchNormal::ProcessSentence (  )  [virtual]


Member Data Documentation

flag indicating that decoder ran out of time (see switch -time-out)

Definition at line 28 of file SearchNormal.h.

Referenced by GetBestHypothesis(), Moses::SearchNormalBatch::ProcessSentence(), and ProcessSentence().

used to seed 1st hypo

Definition at line 26 of file SearchNormal.h.

Referenced by Moses::SearchNormalBatch::ProcessSentence(), ProcessSentence(), and SearchNormal().

clock_t Moses::SearchNormal::m_start [protected]

starting time, used for logging

Definition at line 27 of file SearchNormal.h.

Referenced by Moses::SearchNormalBatch::ProcessSentence(), and ProcessSentence().

actual (full expanded) stack of hypotheses pre-computed list of translation options for the phrases in this sentence

Definition at line 30 of file SearchNormal.h.

Referenced by ExpandAllHypotheses(), ExpandHypothesis(), and ProcessOneHypothesis().


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

Generated on Thu Jul 24 00:31:24 2014 for Moses by  doxygen 1.5.9