#include <map>#include <vector>#include <set>#include "Hypothesis.h"#include "Manager.h"#include "TrellisPathList.h"Go to the source code of this file.
Classes | |
| class | Edge |
| class | NgramScores |
| class | LatticeMBRSolution |
| struct | LatticeMBRSolutionComparator |
Typedefs | |
| typedef std::vector< const Hypothesis * > | Lattice |
| typedef std::vector< const Edge * > | Path |
| typedef std::map< Path, size_t > | PathCounts |
| typedef std::map< Phrase, PathCounts > | NgramHistory |
Functions | |
| void | pruneLatticeFB (Lattice &connectedHyp, std::map< const Hypothesis *, std::set< const Hypothesis * > > &outgoingHyps, std::map< const Hypothesis *, std::vector< Edge > > &incomingEdges, const std::vector< float > &estimatedScores, const Hypothesis *, size_t edgeDensity, float scale) |
| void | getLatticeMBRNBest (Manager &manager, TrellisPathList &nBestList, std::vector< LatticeMBRSolution > &solutions, size_t n) |
| void | calcNgramExpectations (Lattice &connectedHyp, std::map< const Hypothesis *, std::vector< Edge > > &incomingEdges, std::map< Phrase, float > &finalNgramScores, bool posteriors) |
| void | GetOutputFactors (const TrellisPath &path, std::vector< Word > &translation) |
| void | extract_ngrams (const std::vector< Word > &sentence, std::map< Phrase, int > &allngrams) |
| bool | ascendingCoverageCmp (const Hypothesis *a, const Hypothesis *b) |
| std::vector< Word > | doLatticeMBR (Manager &manager, TrellisPathList &nBestList) |
| const TrellisPath | doConsensusDecoding (Manager &manager, TrellisPathList &nBestList) |
| typedef std::vector< const Hypothesis *> Lattice |
Definition at line 24 of file LatticeMBR.h.
| typedef std::map<Phrase, PathCounts > NgramHistory |
Definition at line 29 of file LatticeMBR.h.
Definition at line 27 of file LatticeMBR.h.
| typedef std::map<Path, size_t> PathCounts |
Definition at line 28 of file LatticeMBR.h.
| bool ascendingCoverageCmp | ( | const Hypothesis * | a, | |
| const Hypothesis * | b | |||
| ) |
Definition at line 494 of file LatticeMBR.cpp.
References Moses::WordsBitmap::GetNumWordsCovered(), and Moses::Hypothesis::GetWordsBitmap().
Referenced by calcNgramExpectations().


| void calcNgramExpectations | ( | Lattice & | connectedHyp, | |
| std::map< const Hypothesis *, std::vector< Edge > > & | incomingEdges, | |||
| std::map< Phrase, float > & | finalNgramScores, | |||
| bool | posteriors | |||
| ) |
| const TrellisPath doConsensusDecoding | ( | Manager & | manager, | |
| TrellisPathList & | nBestList | |||
| ) |
Definition at line 554 of file LatticeMBR.cpp.
References Moses::TrellisPathList::begin(), BLEU_ORDER, calcNgramExpectations(), Moses::TrellisPathList::end(), extract_ngrams(), Moses::Manager::GetBestHypothesis(), Moses::Manager::GetForwardBackwardSearchGraph(), Moses::StaticData::GetLatticeMBRPruningFactor(), Moses::StaticData::GetMBRScale(), GetOutputWords(), pruneLatticeFB(), SMOOTH, and VERBOSE.
Referenced by TranslationTask::Run().


| std::vector<Word> doLatticeMBR | ( | Manager & | manager, | |
| TrellisPathList & | nBestList | |||
| ) |
Definition at line 546 of file LatticeMBR.cpp.
References getLatticeMBRNBest().
Referenced by main(), and TranslationTask::Run().


| void getLatticeMBRNBest | ( | Manager & | manager, | |
| TrellisPathList & | nBestList, | |||
| std::vector< LatticeMBRSolution > & | solutions, | |||
| size_t | n | |||
| ) |
| void GetOutputFactors | ( | const TrellisPath & | path, | |
| std::vector< Word > & | translation | |||
| ) |
| void pruneLatticeFB | ( | Lattice & | connectedHyp, | |
| std::map< const Hypothesis *, std::set< const Hypothesis * > > & | outgoingHyps, | |||
| std::map< const Hypothesis *, std::vector< Edge > > & | incomingEdges, | |||
| const std::vector< float > & | estimatedScores, | |||
| const Hypothesis * | , | |||
| size_t | edgeDensity, | |||
| float | scale | |||
| ) |
1.5.9