#include <Manager.h>
Public Member Functions | |
void | OutputNBest (std::ostream &out, const Moses::TrellisPathList &nBestList) const |
void | OutputSurface (std::ostream &out, Hypothesis const &edge, bool const recursive=false) const |
void | OutputAlignment (std::ostream &out, const AlignmentInfo &ai, size_t sourceOffset, size_t targetOffset) const |
void | OutputInput (std::ostream &os, const Hypothesis *hypo) const |
void | OutputInput (std::vector< const Phrase * > &map, const Hypothesis *hypo) const |
void | OutputPassthroughInformation (std::ostream &os, const Hypothesis *hypo) const |
std::map< size_t, const Factor * > | GetPlaceholders (const Hypothesis &hypo, FactorType placeholderFactor) const |
void | OutputWordGraph (std::ostream &outputWordGraphStream, const Hypothesis *hypo, size_t &linkId) const |
void | OutputAlignment (std::ostringstream &out, const TrellisPath &path) const |
Manager (ttasksptr const &ttask) | |
~Manager () | |
const TranslationOptionCollection * | getSntTranslationOptions () |
void | Decode () |
const Hypothesis * | GetBestHypothesis () const |
const Hypothesis * | GetActualBestHypothesis () const |
void | CalcNBest (size_t count, TrellisPathList &ret, bool onlyDistinct=0) const |
void | CalcLatticeSamples (size_t count, TrellisPathList &ret) const |
void | PrintAllDerivations (long translationId, std::ostream &outputStream) const |
void | printDivergentHypothesis (long translationId, const Hypothesis *hypo, const std::vector< const TargetPhrase * > &remainingPhrases, float remainingScore, std::ostream &outputStream) const |
void | printThisHypothesis (long translationId, const Hypothesis *hypo, const std::vector< const TargetPhrase * > &remainingPhrases, float remainingScore, std::ostream &outputStream) const |
void | GetOutputLanguageModelOrder (std::ostream &out, const Hypothesis *hypo) const |
void | GetWordGraph (long translationId, std::ostream &outputWordGraphStream) const |
int | GetNextHypoId () |
void | OutputLatticeMBRNBest (std::ostream &out, const std::vector< LatticeMBRSolution > &solutions, long translationId) const |
void | OutputBestHypo (const std::vector< Moses::Word > &mbrBestHypo, std::ostream &out) const |
void | OutputBestHypo (const Moses::TrellisPath &path, std::ostream &out) const |
void | OutputSearchGraph (long translationId, std::ostream &outputSearchGraphStream) const |
void | OutputSearchGraphAsSLF (long translationId, std::ostream &outputSearchGraphStream) const |
void | OutputSearchGraphAsHypergraph (std::ostream &outputSearchGraphStream) const |
void | GetSearchGraph (std::vector< SearchGraphNode > &searchGraph) const |
const InputType & | GetSource () const |
the input sentence being decoded | |
void | CalcDecoderStatistics () const |
void | ResetSentenceStats (const InputType &source) |
SentenceStats & | GetSentenceStats () const |
void | GetForwardBackwardSearchGraph (std::map< int, bool > *pConnected, std::vector< const Hypothesis * > *pConnectedList, std::map< const Hypothesis *, std::set< const Hypothesis * > > *pOutgoingHyps, std::vector< float > *pFwdBwdScores) const |
void | OutputBest (OutputCollector *collector) const |
void | OutputNBest (OutputCollector *collector) const |
void | OutputAlignment (OutputCollector *collector) const |
void | OutputLatticeSamples (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 |
Protected Member Functions | |
void | GetConnectedGraph (std::map< int, bool > *pConnected, std::vector< const Hypothesis * > *pConnectedList) const |
void | GetWinnerConnectedGraph (std::map< int, bool > *pConnected, std::vector< const Hypothesis * > *pConnectedList) const |
Protected Attributes | |
TranslationOptionCollection * | m_transOptColl |
Search * | m_search |
HypothesisStack * | actual_hypoStack |
size_t | interrupted_flag |
std::auto_ptr< SentenceStats > | m_sentenceStats |
int | m_hypoId |
std::ostringstream | m_latticeNBestOut |
std::ostringstream | m_alignmentOut |
The main decoder loop in the function ProcessSentence() consists of the steps:
Definition at line 96 of file Manager.h.
Moses::Manager::Manager | ( | ttasksptr const & | ttask | ) |
Definition at line 68 of file Manager.cpp.
References Moses::CubePruning, Moses::StaticData::InitializeForInput(), Moses::StaticData::Instance(), m_search, m_transOptColl, Moses::Normal, Moses::BaseManager::options(), and UTIL_THROW2.
Moses::Manager::~Manager | ( | ) |
Definition at line 90 of file Manager.cpp.
References Moses::StaticData::CleanUpAfterSentenceProcessing(), Moses::StaticData::Instance(), m_search, m_transOptColl, and Moses::BaseManager::m_ttask.
void Moses::Manager::CalcDecoderStatistics | ( | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 472 of file Manager.cpp.
References Moses::SentenceStats::CalcFinalStats(), GetBestHypothesis(), Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Hypothesis::GetInput(), Moses::Hypothesis::GetPrevHypo(), GetSentenceStats(), IFVERBOSE, NULL, util::ToString(), and TRACE_ERR.
void Moses::Manager::CalcLatticeSamples | ( | size_t | count, | |
TrellisPathList & | ret | |||
) | const |
Implements lattice sampling, as in Chatterjee & Cancedda, emnlp 2010
Definition at line 324 of file Manager.cpp.
References Moses::TrellisPathList::Add(), Moses::Hypothesis::GetId(), Moses::Hypothesis::GetPrevHypo(), Moses::Hypothesis::GetScore(), GetSearchGraph(), Moses::log_sum(), util::rand_incl(), sort(), and UTIL_THROW_IF2.
Referenced by OutputLatticeSamples().
void Moses::Manager::CalcNBest | ( | size_t | count, | |
TrellisPathList & | ret, | |||
bool | onlyDistinct = 0 | |||
) | const |
After decoding, the hypotheses in the stacks and additional arcs form a search graph that can be mined for n-best lists. The heavy lifting is done in the TrellisPath and TrellisPathCollection this function controls this for one sentence.
count | the number of n-best translations to produce | |
ret | holds the n-best list that was calculated |
Definition at line 256 of file Manager.cpp.
References Moses::TrellisPathList::Add(), Moses::TrellisPathCollection::Add(), Moses::TrellisPath::CreateDeviantPaths(), Moses::Search::GetHypothesisStacks(), Moses::TrellisPathCollection::GetSize(), Moses::TrellisPathList::GetSize(), Moses::TrellisPath::GetSurfacePhrase(), m_search, NULL, Moses::BaseManager::options(), Moses::TrellisPathCollection::pop(), Moses::TrellisPathCollection::Prune(), and UTIL_THROW_IF2.
Referenced by main(), OutputBest(), and OutputNBest().
void Moses::Manager::Decode | ( | ) | [virtual] |
Main decoder loop that translates a sentence by expanding hypotheses stack by stack, until the end of the sentence.
Implements Moses::BaseManager.
Definition at line 107 of file Manager.cpp.
References Moses::TranslationOptionCollection::CreateTranslationOptions(), Moses::Search::Decode(), GetSentenceStats(), Moses::InputType::GetSpecifiesWeightSetting(), Moses::SentenceStats::GetTimeCollectOpts(), Moses::InputType::GetTranslationId(), Moses::InputType::GetWeightSetting(), IFVERBOSE, Moses::StaticData::Instance(), m_search, Moses::BaseManager::m_source, m_transOptColl, ResetSentenceStats(), Moses::StaticData::SetWeightSetting(), Moses::Timer::start(), Moses::SentenceStats::StartTimeCollectOpts(), Moses::SentenceStats::StartTimeTotal(), Moses::SentenceStats::StopTimeCollectOpts(), Moses::SentenceStats::StopTimeTotal(), TRACE_ERR, and VERBOSE.
Referenced by main().
const Hypothesis* Moses::Manager::GetActualBestHypothesis | ( | ) | const |
const Hypothesis * Moses::Manager::GetBestHypothesis | ( | ) | const |
Definition at line 1435 of file Manager.cpp.
References Moses::Search::GetBestHypothesis(), and m_search.
Referenced by CalcDecoderStatistics(), Moses::doConsensusDecoding(), Moses::getLatticeMBRNBest(), OutputAlignment(), OutputBest(), and OutputDetailedTranslationReport().
void Moses::Manager::GetConnectedGraph | ( | std::map< int, bool > * | pConnected, | |
std::vector< const Hypothesis * > * | pConnectedList | |||
) | const [protected] |
Definition at line 1148 of file Manager.cpp.
References Moses::HypothesisStack::begin(), Moses::HypothesisStack::end(), Moses::Hypothesis::GetArcList(), Moses::Search::GetHypothesisStacks(), Moses::Hypothesis::GetId(), Moses::Hypothesis::GetPrevHypo(), m_search, and NULL.
void Moses::Manager::GetForwardBackwardSearchGraph | ( | std::map< int, bool > * | pConnected, | |
std::vector< const Hypothesis * > * | pConnectedList, | |||
std::map< const Hypothesis *, std::set< const Hypothesis * > > * | pOutgoingHyps, | |||
std::vector< float > * | pFwdBwdScores | |||
) | const |
Referenced by Moses::doConsensusDecoding(), and Moses::getLatticeMBRNBest().
int Moses::Manager::GetNextHypoId | ( | ) |
Definition at line 1440 of file Manager.cpp.
References Moses::SentenceStats::AddCreated(), GetSentenceStats(), and m_hypoId.
Referenced by Moses::SearchNormal::Decode(), Moses::SearchCubePruning::Decode(), and Moses::SearchNormal::ExpandHypothesis().
void Moses::Manager::GetOutputLanguageModelOrder | ( | std::ostream & | out, | |
const Hypothesis * | hypo | |||
) | const |
Definition at line 578 of file Manager.cpp.
References Moses::Hypothesis::GetOutputPhrase(), and Moses::StatefulFeatureFunction::GetStatefulFeatureFunctions().
Referenced by OutputBest().
std::map< size_t, const Factor * > Moses::Manager::GetPlaceholders | ( | const Hypothesis & | hypo, | |
FactorType | placeholderFactor | |||
) | const |
Definition at line 1797 of file Manager.cpp.
References Moses::AlignmentInfo::GetAlignmentsForSource(), Moses::TargetPhrase::GetAlignTerm(), Moses::Phrase::GetFactor(), Moses::TranslationOption::GetInputPath(), Moses::InputPath::GetPhrase(), Moses::Phrase::GetSize(), Moses::TranslationOption::GetTargetPhrase(), Moses::Hypothesis::GetTranslationOption(), and UTIL_THROW_IF2.
Referenced by OutputSurface().
void Moses::Manager::GetSearchGraph | ( | std::vector< SearchGraphNode > & | searchGraph | ) | const |
Referenced by CalcLatticeSamples(), OutputSearchGraph(), OutputSearchGraphAsHypergraph(), and OutputSearchGraphAsSLF().
SentenceStats & Moses::Manager::GetSentenceStats | ( | ) | const |
Definition at line 1450 of file Manager.cpp.
References m_sentenceStats.
Referenced by Moses::HypothesisStackNormal::AddPrune(), Moses::HypothesisStackCubePruning::AddPrune(), CalcDecoderStatistics(), Moses::SearchCubePruning::Decode(), Decode(), Moses::LanguageModelImplementation::EvaluateWhenApplied(), Moses::SearchNormal::ExpandHypothesis(), GetNextHypoId(), Moses::SearchNormal::ProcessOneStack(), Moses::HypothesisStackNormal::PruneToSize(), and Moses::HypothesisStackCubePruning::PruneToSize().
const TranslationOptionCollection * Moses::Manager::getSntTranslationOptions | ( | ) |
Definition at line 183 of file Manager.cpp.
References m_transOptColl.
Referenced by Moses::VW::EvaluateWhenApplied().
const InputType & Moses::Manager::GetSource | ( | ) | const |
the input sentence being decoded
Reimplemented from Moses::BaseManager.
Definition at line 98 of file Manager.cpp.
References Moses::BaseManager::m_source.
Referenced by Moses::BilingualLM::EvaluateWhenApplied(), Moses::VW::EvaluateWhenApplied(), Moses::OpSequenceModel::EvaluateWhenApplied(), Moses::CoveredReferenceFeature::EvaluateWhenApplied(), OutputPassthroughInformation(), OutputSearchGraphAsHypergraph(), and Moses::HypothesisStackCubePruning::SetBitmapAccessor().
void Moses::Manager::GetWinnerConnectedGraph | ( | std::map< int, bool > * | pConnected, | |
std::vector< const Hypothesis * > * | pConnectedList | |||
) | const [protected] |
Definition at line 1192 of file Manager.cpp.
References Moses::HypothesisStack::begin(), Moses::HypothesisStack::end(), Moses::Hypothesis::GetArcList(), Moses::Search::GetHypothesisStacks(), Moses::Hypothesis::GetId(), Moses::Hypothesis::GetPrevHypo(), m_search, and NULL.
void Moses::Manager::GetWordGraph | ( | long | translationId, | |
std::ostream & | outputWordGraphStream | |||
) | const |
Definition at line 591 of file Manager.cpp.
References Moses::HypothesisStack::begin(), Moses::HypothesisStack::end(), Moses::Hypothesis::GetArcList(), Moses::Search::GetHypothesisStacks(), Moses::Parameter::GetParam(), Moses::StaticData::GetParameter(), Moses::StaticData::Instance(), m_search, NULL, OutputWordGraph(), params, and Moses::Scan< bool >().
Referenced by OutputWordGraph().
void Moses::Manager::OutputAlignment | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1830 of file Manager.cpp.
References Moses::TargetPhrase::GetAlignTerm(), GetBestHypothesis(), Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Hypothesis::GetPrevHypo(), Moses::Phrase::GetSize(), Moses::Range::GetStartPos(), Moses::InputType::GetTranslationId(), m_alignmentOut, Moses::BaseManager::m_source, NULL, OutputAlignment(), and Moses::OutputCollector::Write().
void Moses::Manager::OutputAlignment | ( | std::ostringstream & | out, | |
const TrellisPath & | path | |||
) | const |
Definition at line 2006 of file Manager.cpp.
References Moses::TrellisPath::GetEdges(), Moses::BaseManager::options(), and Moses::Hypothesis::OutputAlignment().
void Moses::Manager::OutputAlignment | ( | std::ostream & | out, | |
const AlignmentInfo & | ai, | |||
size_t | sourceOffset, | |||
size_t | targetOffset | |||
) | const |
Referenced by OutputAlignment(), OutputBest(), OutputNBest(), and OutputSurface().
void Moses::Manager::OutputBest | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1456 of file Manager.cpp.
References CalcNBest(), debug, Moses::doConsensusDecoding(), Moses::doLatticeMBR(), doMBR(), Moses::FixPrecision(), GetBestHypothesis(), Moses::Hypothesis::GetFutureScore(), Moses::getLatticeMBRNBest(), GetOutputLanguageModelOrder(), Moses::TrellisPathList::GetSize(), Moses::InputType::GetTranslationId(), IFVERBOSE, m_alignmentOut, m_latticeNBestOut, Moses::BaseManager::m_source, n, nbest(), NULL, Moses::BaseManager::options(), OutputAlignment(), Moses::Hypothesis::OutputAlignment(), OutputBestHypo(), Moses::Hypothesis::OutputInput(), OutputLatticeMBRNBest(), OutputPassthroughInformation(), OutputSurface(), PrintAllDerivations(), Moses::PrintUserTime(), Moses::Timer::start(), Moses::Timer::stop(), VERBOSE, and Moses::OutputCollector::Write().
void Moses::Manager::OutputBestHypo | ( | const Moses::TrellisPath & | path, | |
std::ostream & | out | |||
) | const |
Definition at line 1994 of file Manager.cpp.
References Moses::TrellisPath::GetEdges(), and OutputSurface().
void Moses::Manager::OutputBestHypo | ( | const std::vector< Moses::Word > & | mbrBestHypo, | |
std::ostream & | out | |||
) | const |
void Moses::Manager::OutputDetailedTranslationReport | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1861 of file Manager.cpp.
References Moses::FixPrecision(), GetBestHypothesis(), Moses::InputType::GetTranslationId(), Moses::BaseManager::m_source, TranslationAnalysis::PrintTranslationAnalysis(), and Moses::OutputCollector::Write().
void Moses::Manager::OutputDetailedTreeFragmentsTranslationReport | ( | OutputCollector * | collector | ) | const [inline, virtual] |
void Moses::Manager::OutputInput | ( | std::vector< const Phrase * > & | map, | |
const Hypothesis * | hypo | |||
) | const |
Definition at line 1789 of file Manager.cpp.
References Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::TranslationOption::GetInputPath(), Moses::InputPath::GetPhrase(), Moses::Hypothesis::GetPrevHypo(), Moses::Range::GetStartPos(), Moses::Hypothesis::GetTranslationOption(), and OutputInput().
void Moses::Manager::OutputInput | ( | std::ostream & | os, | |
const Hypothesis * | hypo | |||
) | const |
Definition at line 1780 of file Manager.cpp.
References Moses::Hypothesis::GetInput(), and Moses::InputType::GetSize().
Referenced by OutputInput(), and OutputNBest().
void Moses::Manager::OutputLatticeMBRNBest | ( | std::ostream & | out, | |
const std::vector< LatticeMBRSolution > & | solutions, | |||
long | translationId | |||
) | const |
void Moses::Manager::OutputLatticeSamples | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1818 of file Manager.cpp.
References CalcLatticeSamples(), Moses::InputType::GetTranslationId(), Moses::BaseManager::m_source, Moses::BaseManager::options(), OutputNBest(), and Moses::OutputCollector::Write().
void Moses::Manager::OutputNBest | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1583 of file Manager.cpp.
References CalcNBest(), Moses::InputType::GetTranslationId(), m_latticeNBestOut, Moses::BaseManager::m_source, nbest(), Moses::NBestOptions::nbest_size, NULL, Moses::NBestOptions::only_distinct, Moses::BaseManager::options(), OutputNBest(), and Moses::OutputCollector::Write().
void Moses::Manager::OutputNBest | ( | std::ostream & | out, | |
const Moses::TrellisPathList & | nBestList | |||
) | const |
Definition at line 1606 of file Manager.cpp.
References Moses::TrellisPathList::begin(), Moses::TrellisPathList::end(), Moses::TargetPhrase::GetAlignTerm(), Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::TrellisPath::GetEdges(), Moses::Range::GetEndPos(), Moses::TrellisPath::GetFutureScore(), Moses::TrellisPath::GetScoreBreakdown(), Moses::Range::GetStartPos(), Moses::TrellisPath::GetTargetWordsRange(), Moses::InputType::GetTranslationId(), Moses::NBestOptions::include_alignment_info, Moses::NBestOptions::include_all_factors, Moses::NBestOptions::include_segmentation, Moses::BaseManager::m_source, Moses::BaseManager::options(), OutputAlignment(), OutputInput(), and OutputSurface().
Referenced by OutputLatticeSamples(), and OutputNBest().
void Moses::Manager::OutputPassthroughInformation | ( | std::ostream & | os, | |
const Hypothesis * | hypo | |||
) | const |
Definition at line 571 of file Manager.cpp.
References Moses::Hypothesis::GetManager(), Moses::InputType::GetPassthroughInformation(), and GetSource().
Referenced by OutputBest().
void Moses::Manager::OutputSearchGraph | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1904 of file Manager.cpp.
References Moses::FixPrecision(), Moses::InputType::GetTranslationId(), Moses::StaticData::Instance(), Moses::BaseManager::m_source, OutputSearchGraph(), VERBOSE, and Moses::OutputCollector::Write().
void Moses::Manager::OutputSearchGraph | ( | long | translationId, | |
std::ostream & | outputSearchGraphStream | |||
) | const |
Definition at line 1341 of file Manager.cpp.
References GetSearchGraph(), Moses::BaseManager::options(), and Moses::OutputSearchNode().
Referenced by OutputSearchGraph().
void Moses::Manager::OutputSearchGraphAsHypergraph | ( | std::ostream & | outputSearchGraphStream | ) | const [virtual] |
! Output search graph in hypergraph format of Kenneth Heafield's lazy hypergraph decoder
Reimplemented from Moses::BaseManager.
Definition at line 841 of file Manager.cpp.
References count, Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Hypothesis::GetId(), Moses::Bitmap::GetNumWordsCovered(), Moses::Hypothesis::GetPrevHypo(), GetSearchGraph(), Moses::InputType::GetSize(), Moses::Phrase::GetSize(), GetSource(), Moses::InputType::GetTranslationId(), Moses::Hypothesis::GetWordsBitmap(), lineNumber, Moses::BaseManager::m_source, NULL, range, UTIL_THROW_IF2, and VERBOSE.
void Moses::Manager::OutputSearchGraphAsSLF | ( | long | translationId, | |
std::ostream & | outputSearchGraphStream | |||
) | const |
! Output search graph in HTK standard lattice format (SLF)
Definition at line 994 of file Manager.cpp.
References Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Hypothesis::GetId(), Moses::Hypothesis::GetPrevHypo(), GetSearchGraph(), Moses::Phrase::GetSize(), Moses::Phrase::GetWord(), and lineNumber.
Referenced by OutputSearchGraphSLF().
void Moses::Manager::OutputSearchGraphSLF | ( | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1928 of file Manager.cpp.
References Moses::FixPrecision(), Moses::InputType::GetTranslationId(), Moses::BaseManager::m_source, Moses::BaseManager::options(), OutputSearchGraphAsSLF(), util::StringStream::str(), and TRACE_ERR.
void Moses::Manager::OutputSurface | ( | std::ostream & | out, | |
Hypothesis const & | edge, | |||
bool const | recursive = false | |||
) | const |
Definition at line 1683 of file Manager.cpp.
References Moses::TargetPhrase::GetAlignTerm(), Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Range::GetEndPos(), Moses::Phrase::GetFactor(), GetPlaceholders(), Moses::Hypothesis::GetPrevHypo(), Moses::Hypothesis::GetScore(), Moses::Hypothesis::GetScoreBreakdown(), Moses::Phrase::GetSize(), Moses::Range::GetStartPos(), Moses::Phrase::GetWord(), Moses::Word::IsOOV(), NOT_FOUND, NULL, Moses::BaseManager::options(), OutputAlignment(), and UTIL_THROW_IF2.
Referenced by OutputBest(), OutputBestHypo(), and OutputNBest().
void Moses::Manager::OutputUnknowns | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1874 of file Manager.cpp.
References Moses::InputType::GetTranslationId(), Moses::TranslationOptionCollection::GetUnknownSources(), Moses::BaseManager::m_source, m_transOptColl, and Moses::OutputCollector::Write().
void Moses::Manager::OutputWordGraph | ( | OutputCollector * | collector | ) | const [virtual] |
Implements Moses::BaseManager.
Definition at line 1891 of file Manager.cpp.
References Moses::FixPrecision(), Moses::InputType::GetTranslationId(), GetWordGraph(), Moses::BaseManager::m_source, and Moses::OutputCollector::Write().
void Moses::Manager::OutputWordGraph | ( | std::ostream & | outputWordGraphStream, | |
const Hypothesis * | hypo, | |||
size_t & | linkId | |||
) | const |
Definition at line 507 of file Manager.cpp.
References Moses::PhraseDictionary::GetColl(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::FeatureFunction::GetFeatureFunctions(), Moses::Hypothesis::GetId(), Moses::Hypothesis::GetPrevHypo(), Moses::Hypothesis::GetScoreBreakdown(), Moses::ScoreComponentCollection::GetScoreForProducer(), Moses::ScoreComponentCollection::GetScoresForProducer(), Moses::Hypothesis::GetSourcePhraseStringRep(), and Moses::StatefulFeatureFunction::GetStatefulFeatureFunctions().
Referenced by GetWordGraph().
void Moses::Manager::PrintAllDerivations | ( | long | translationId, | |
std::ostream & | outputStream | |||
) | const |
void Moses::Manager::printDivergentHypothesis | ( | long | translationId, | |
const Hypothesis * | hypo, | |||
const std::vector< const TargetPhrase * > & | remainingPhrases, | |||
float | remainingScore, | |||
std::ostream & | outputStream | |||
) | const |
void Moses::Manager::printThisHypothesis | ( | long | translationId, | |
const Hypothesis * | hypo, | |||
const std::vector< const TargetPhrase * > & | remainingPhrases, | |||
float | remainingScore, | |||
std::ostream & | outputStream | |||
) | const |
void Moses::Manager::ResetSentenceStats | ( | const InputType & | source | ) |
Definition at line 1446 of file Manager.cpp.
References m_sentenceStats.
Referenced by Decode().
HypothesisStack* Moses::Manager::actual_hypoStack [protected] |
size_t Moses::Manager::interrupted_flag [protected] |
std::ostringstream Moses::Manager::m_alignmentOut [mutable, protected] |
int Moses::Manager::m_hypoId [protected] |
std::ostringstream Moses::Manager::m_latticeNBestOut [mutable, protected] |
Search* Moses::Manager::m_search [protected] |
Definition at line 116 of file Manager.h.
Referenced by CalcNBest(), Decode(), GetBestHypothesis(), GetConnectedGraph(), GetWinnerConnectedGraph(), GetWordGraph(), Manager(), and ~Manager().
std::auto_ptr<SentenceStats> Moses::Manager::m_sentenceStats [protected] |
Definition at line 120 of file Manager.h.
Referenced by GetSentenceStats(), and ResetSentenceStats().
pre-computed list of translation options for the phrases in this sentence
Definition at line 115 of file Manager.h.
Referenced by Decode(), getSntTranslationOptions(), Manager(), OutputUnknowns(), and ~Manager().