#include <ChartKBestExtractor.h>
Classes | |
struct | Derivation |
struct | DerivationEqualityPred |
struct | DerivationHasher |
struct | DerivationOrderer |
struct | UnweightedHyperarc |
struct | Vertex |
Public Types | |
typedef std::vector < boost::shared_ptr < Derivation > > | KBestVec |
Public Member Functions | |
void | Extract (const std::vector< const ChartHypothesis * > &topHypos, std::size_t k, KBestVec &) |
Static Public Member Functions | |
static Phrase | GetOutputPhrase (const Derivation &) |
static boost::shared_ptr < ScoreComponentCollection > | GetOutputScoreBreakdown (const Derivation &) |
static TreePointer | GetOutputTree (const Derivation &) |
Definition at line 43 of file ChartKBestExtractor.h.
typedef std::vector<boost::shared_ptr<Derivation> > Moses::ChartKBestExtractor::KBestVec |
Definition at line 85 of file ChartKBestExtractor.h.
void Moses::ChartKBestExtractor::Extract | ( | const std::vector< const ChartHypothesis * > & | topHypos, | |
std::size_t | k, | |||
KBestVec & | kBestList | |||
) |
Definition at line 36 of file ChartKBestExtractor.cpp.
References Moses::ChartHypothesis::GetFutureScore(), and UTIL_THROW_IF2.
Phrase Moses::ChartKBestExtractor::GetOutputPhrase | ( | const Derivation & | d | ) | [static] |
Definition at line 83 of file ChartKBestExtractor.cpp.
References Moses::Phrase::AddWord(), Moses::Phrase::Append(), Moses::ARRAY_SIZE_INCR, Moses::Phrase::Back(), Moses::ChartKBestExtractor::Derivation::edge, Moses::AlignmentInfo::GetAlignmentsForTarget(), Moses::TargetPhrase::GetAlignNonTerm(), Moses::TargetPhrase::GetAlignTerm(), Moses::ChartHypothesis::GetCurrTargetPhrase(), Moses::Word::GetFactor(), Moses::AlignmentInfo::GetNonTermIndexMap(), Moses::Phrase::GetSize(), Moses::ChartTranslationOption::GetSourceRuleFromInputPath(), Moses::ChartHypothesis::GetTranslationOption(), Moses::Phrase::GetWord(), Moses::ChartKBestExtractor::UnweightedHyperarc::head, Moses::StaticData::Instance(), Moses::Word::IsNonTerminal(), NOT_FOUND, NULL, Moses::StaticData::options(), Moses::ChartKBestExtractor::Derivation::subderivations, and UTIL_THROW_IF2.
boost::shared_ptr< ScoreComponentCollection > Moses::ChartKBestExtractor::GetOutputScoreBreakdown | ( | const Derivation & | d | ) | [static] |
Definition at line 129 of file ChartKBestExtractor.cpp.
References Moses::ChartKBestExtractor::Derivation::edge, Moses::TargetPhrase::GetAlignNonTerm(), Moses::ChartHypothesis::GetCurrTargetPhrase(), Moses::ChartHypothesis::GetDeltaScoreBreakdown(), Moses::AlignmentInfo::GetNonTermIndexMap(), Moses::Phrase::GetSize(), Moses::Phrase::GetWord(), Moses::ChartKBestExtractor::UnweightedHyperarc::head, Moses::Word::IsNonTerminal(), and Moses::ChartKBestExtractor::Derivation::subderivations.
TreePointer Moses::ChartKBestExtractor::GetOutputTree | ( | const Derivation & | d | ) | [static] |
Definition at line 150 of file ChartKBestExtractor.cpp.
References Moses::ChartKBestExtractor::Derivation::edge, Moses::TargetPhrase::GetAlignNonTerm(), Moses::ChartHypothesis::GetCurrTargetPhrase(), Moses::AlignmentInfo::GetNonTermIndexMap(), Moses::TargetPhrase::GetProperty(), Moses::Phrase::GetSize(), Moses::Phrase::GetWord(), Moses::ChartKBestExtractor::UnweightedHyperarc::head, Moses::Word::IsNonTerminal(), Moses::ChartKBestExtractor::Derivation::subderivations, and UTIL_THROW2.