#include <vector>
#include <map>
#include "moses/TrellisPathList.h"
#include "moses/TrellisPath.h"
#include "moses/Factor.h"
Go to the source code of this file.
Functions | |
std::vector< const Moses::Factor * > | doMBR (const Moses::TrellisPathList &nBestList) |
void | GetOutputFactors (const Moses::TrellisPath &path, std::vector< const Moses::Factor * > &translation) |
float | calculate_score (const std::vector< std::vector< const Moses::Factor * > > &sents, int ref, int hyp, std::vector< std::map< std::vector< const Moses::Factor * >, int > > &ngram_stats) |
float calculate_score | ( | const std::vector< std::vector< const Moses::Factor * > > & | sents, | |
int | ref, | |||
int | hyp, | |||
std::vector< std::map< std::vector< const Moses::Factor * >, int > > & | ngram_stats | |||
) |
std::vector<const Moses::Factor*> doMBR | ( | const Moses::TrellisPathList & | nBestList | ) |
Definition at line 92 of file mbr.cpp.
References Moses::TrellisPathList::at(), Moses::TrellisPathList::begin(), calculate_score(), Moses::TrellisPathList::end(), MosesCmd::extract_ngrams(), MosesCmd::GetOutputFactors(), Moses::TrellisPath::GetScoreBreakdown(), Moses::TrellisPathList::GetSize(), Moses::ScoreComponentCollection::GetWeightedScore(), and Moses::UntransformScore().
Referenced by MosesCmd::TranslationTask::Run().
void GetOutputFactors | ( | const Moses::TrellisPath & | path, | |
std::vector< const Moses::Factor * > & | translation | |||
) |