#include <Search.h>
Public Member Functions | |
virtual const std::vector < HypothesisStack * > & | GetHypothesisStacks () const =0 |
virtual const Hypothesis * | GetBestHypothesis () const =0 |
virtual void | Decode ()=0 |
Decode the sentence according to the specified search algorithm. | |
Search (Manager &manager) | |
virtual | ~Search () |
Protected Member Functions | |
bool | out_of_time () |
Protected Attributes | |
Manager & | m_manager |
const InputType & | m_source |
AllOptions const & | m_options |
InputPath | m_inputPath |
TranslationOption | m_initialTransOpt |
Bitmaps | m_bitmaps |
size_t | interrupted_flag |
Timer | m_timer |
Actual search class that implement the cube pruning algorithm (SearchCubePruning) or standard beam search (SearchNormal) should inherits from this class, and override pure virtual functions.
Definition at line 28 of file Search.h.
Moses::Search::Search | ( | Manager & | manager | ) | [explicit] |
Definition at line 10 of file Search.cpp.
References m_initialTransOpt, m_inputPath, m_timer, Moses::TranslationOption::SetInputPath(), and Moses::Timer::start().
virtual void Moses::Search::Decode | ( | ) | [pure virtual] |
Decode the sentence according to the specified search algorithm.
Implemented in Moses::SearchCubePruning, and Moses::SearchNormal.
Referenced by Moses::Manager::Decode().
virtual const Hypothesis* Moses::Search::GetBestHypothesis | ( | ) | const [pure virtual] |
Implemented in Moses::SearchCubePruning, and Moses::SearchNormal.
Referenced by Moses::Manager::GetBestHypothesis().
virtual const std::vector<HypothesisStack*>& Moses::Search::GetHypothesisStacks | ( | ) | const [pure virtual] |
Implemented in Moses::SearchCubePruning, and Moses::SearchNormal.
Referenced by Moses::Manager::CalcNBest(), Moses::Manager::GetConnectedGraph(), Moses::Manager::GetWinnerConnectedGraph(), and Moses::Manager::GetWordGraph().
bool Moses::Search::out_of_time | ( | ) | [protected] |
Definition at line 25 of file Search.cpp.
References Moses::Timer::get_elapsed_time(), Moses::GetUserTime(), interrupted_flag, m_options, m_timer, Moses::AllOptions::search, Moses::SearchOptions::segment_timeout, Moses::SearchOptions::timeout, and VERBOSE.
Referenced by Moses::SearchCubePruning::Decode(), and Moses::SearchNormal::ProcessOneStack().
size_t Moses::Search::interrupted_flag [protected] |
flag indicating that decoder ran out of time (see switch -time-out)
Definition at line 50 of file Search.h.
Referenced by Moses::SearchNormal::GetBestHypothesis(), and out_of_time().
Bitmaps Moses::Search::m_bitmaps [protected] |
Definition at line 47 of file Search.h.
Referenced by Moses::SearchCubePruning::CreateForwardTodos(), Moses::SearchNormal::Decode(), Moses::SearchCubePruning::Decode(), and Moses::SearchNormal::ExpandAllHypotheses().
TranslationOption Moses::Search::m_initialTransOpt [protected] |
used to seed 1st hypo
Definition at line 46 of file Search.h.
Referenced by Moses::SearchNormal::Decode(), Moses::SearchCubePruning::Decode(), and Search().
InputPath Moses::Search::m_inputPath [protected] |
Manager& Moses::Search::m_manager [protected] |
Definition at line 41 of file Search.h.
Referenced by Moses::SearchCubePruning::CheckDistortion(), Moses::SearchCubePruning::CreateForwardTodos(), Moses::SearchNormal::Decode(), Moses::SearchCubePruning::Decode(), Moses::SearchNormal::ExpandHypothesis(), Moses::SearchNormal::ProcessOneStack(), Moses::SearchCubePruning::SearchCubePruning(), and Moses::SearchNormal::SearchNormal().
AllOptions const& Moses::Search::m_options [protected] |
Definition at line 43 of file Search.h.
Referenced by Moses::SearchCubePruning::Decode(), Moses::SearchNormal::ExpandAllHypotheses(), Moses::SearchNormal::ExpandHypothesis(), out_of_time(), Moses::SearchNormal::ProcessOneHypothesis(), Moses::SearchNormal::ProcessOneStack(), Moses::SearchCubePruning::SearchCubePruning(), and Moses::SearchNormal::SearchNormal().
const InputType& Moses::Search::m_source [protected] |
Timer Moses::Search::m_timer [protected] |