#include <ChartTranslationOptions.h>
Public Types | |
typedef std::vector < boost::shared_ptr < ChartTranslationOption > > | CollType |
Public Member Functions | |
ChartTranslationOptions (const TargetPhraseCollection &targetPhraseColl, const StackVec &stackVec, const Range &range, float score) | |
~ChartTranslationOptions () | |
size_t | GetSize () const |
const StackVec & | GetStackVec () const |
const CollType & | GetTargetPhrases () const |
const Range & | GetSourceWordsRange () const |
the range in the source sentence this translation option covers | |
float | GetEstimateOfBestScore () const |
void | EvaluateWithSourceContext (const InputType &input, const InputPath &inputPath) |
void | SetInputPath (const InputPath *inputPath) |
void | CreateSourceRuleFromInputPath () |
Static Public Member Functions | |
static float | CalcEstimateOfBestScore (const TargetPhraseCollection &, const StackVec &) |
Friends | |
std::ostream & | operator<< (std::ostream &, const ChartTranslationOptions &) |
Definition at line 40 of file ChartTranslationOptions.h.
typedef std::vector<boost::shared_ptr<ChartTranslationOption> > Moses::ChartTranslationOptions::CollType |
Definition at line 45 of file ChartTranslationOptions.h.
Moses::ChartTranslationOptions::ChartTranslationOptions | ( | const TargetPhraseCollection & | targetPhraseColl, | |
const StackVec & | stackVec, | |||
const Range & | range, | |||
float | score | |||
) |
Constructor
targetPhraseColl |
stackVec |
range | the range in the source sentence this translation option covers | |
score |
Definition at line 33 of file ChartTranslationOptions.cpp.
References Moses::TargetPhraseCollection::begin(), and Moses::TargetPhraseCollection::end().
Moses::ChartTranslationOptions::~ChartTranslationOptions | ( | ) |
Definition at line 50 of file ChartTranslationOptions.cpp.
static float Moses::ChartTranslationOptions::CalcEstimateOfBestScore | ( | const TargetPhraseCollection & | , | |
const StackVec & | ||||
) | [static] |
void Moses::ChartTranslationOptions::CreateSourceRuleFromInputPath | ( | ) |
Definition at line 116 of file ChartTranslationOptions.cpp.
References Moses::InputPath::AddRuleSourceFromInputPath(), Moses::ChartCellLabel::GetCoverage(), Moses::Range::GetEndPos(), Moses::InputPath::GetPhrase(), Moses::Range::GetStartPos(), Moses::Phrase::GetWord(), NULL, and Moses::ChartTranslationOption::SetSourceRuleFromInputPath().
Referenced by EvaluateWithSourceContext().
void Moses::ChartTranslationOptions::EvaluateWithSourceContext | ( | const InputType & | input, | |
const InputPath & | inputPath | |||
) |
Definition at line 67 of file ChartTranslationOptions.cpp.
References CreateSourceRuleFromInputPath(), Moses::ChartTranslationOption::EvaluateWithSourceContext(), Moses::ChartTranslationOption::GetScores(), Moses::ScoreComponentCollection::GetWeightedScore(), Moses::StaticData::Instance(), NOT_FOUND, Moses::TranslationTask::options(), Moses::StaticData::RequireSortingAfterSourceContext(), Moses::ChartTranslationOption::SetInputPath(), SetInputPath(), sort(), and Moses::InputPath::ttask.
Referenced by Moses::ChartTranslationOptionList::EvaluateWithSourceContext().
float Moses::ChartTranslationOptions::GetEstimateOfBestScore | ( | ) | const [inline] |
return an estimate of the best score possible with this translation option. the estimate is the sum of the top target phrase's estimated score plus the scores of the best child hypotheses.
Definition at line 85 of file ChartTranslationOptions.h.
Referenced by Moses::ChartTranslationOptionList::ApplyThreshold(), and Moses::ChartTranslationOptionOrderer::operator()().
size_t Moses::ChartTranslationOptions::GetSize | ( | ) | const [inline] |
Definition at line 62 of file ChartTranslationOptions.h.
Referenced by Moses::ChartTranslationOptionList::EvaluateWithSourceContext().
const Range& Moses::ChartTranslationOptions::GetSourceWordsRange | ( | ) | const [inline] |
the range in the source sentence this translation option covers
Definition at line 77 of file ChartTranslationOptions.h.
Referenced by Moses::ChartManager::AddXmlChartOptions().
const StackVec& Moses::ChartTranslationOptions::GetStackVec | ( | ) | const [inline] |
Definition at line 67 of file ChartTranslationOptions.h.
Referenced by Moses::RuleCubeItem::RuleCubeItem().
const CollType& Moses::ChartTranslationOptions::GetTargetPhrases | ( | ) | const [inline] |
Definition at line 72 of file ChartTranslationOptions.h.
void Moses::ChartTranslationOptions::SetInputPath | ( | const InputPath * | inputPath | ) |
Definition at line 107 of file ChartTranslationOptions.cpp.
References Moses::ChartTranslationOption::SetInputPath().
Referenced by EvaluateWithSourceContext().
std::ostream& operator<< | ( | std::ostream & | out, | |
const ChartTranslationOptions & | obj | |||
) | [friend] |
Definition at line 158 of file ChartTranslationOptions.cpp.