mosesdecoder/moses-cmd/src/LatticeMBR.cpp File Reference

#include "LatticeMBR.h"
#include "StaticData.h"
#include <algorithm>
#include <set>

Go to the source code of this file.

Functions

void GetOutputWords (const TrellisPath &path, vector< Word > &translation)
void extract_ngrams (const vector< Word > &sentence, map< Phrase, int > &allngrams)
void pruneLatticeFB (Lattice &connectedHyp, map< const Hypothesis *, set< const Hypothesis * > > &outgoingHyps, map< const Hypothesis *, vector< Edge > > &incomingEdges, const vector< float > &estimatedScores, const Hypothesis *bestHypo, size_t edgeDensity, float scale)
void calcNgramExpectations (Lattice &connectedHyp, map< const Hypothesis *, vector< Edge > > &incomingEdges, map< Phrase, float > &finalNgramScores, bool posteriors)
ostream & operator<< (ostream &out, const Edge &edge)
bool ascendingCoverageCmp (const Hypothesis *a, const Hypothesis *b)
void getLatticeMBRNBest (Manager &manager, TrellisPathList &nBestList, vector< LatticeMBRSolution > &solutions, size_t n)
vector< WorddoLatticeMBR (Manager &manager, TrellisPathList &nBestList)
const TrellisPath doConsensusDecoding (Manager &manager, TrellisPathList &nBestList)

Variables

size_t bleu_order = 4
float UNKNGRAMLOGPROB = -20


Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void calcNgramExpectations ( Lattice connectedHyp,
map< const Hypothesis *, vector< Edge > > &  incomingEdges,
map< Phrase, float > &  finalNgramScores,
bool  posteriors 
)

const TrellisPath doConsensusDecoding ( Manager manager,
TrellisPathList nBestList 
)

vector<Word> doLatticeMBR ( Manager manager,
TrellisPathList nBestList 
)

Definition at line 546 of file LatticeMBR.cpp.

References getLatticeMBRNBest().

Referenced by main(), and TranslationTask::Run().

Here is the call graph for this function:

Here is the caller graph for this function:

void extract_ngrams ( const vector< Word > &  sentence,
map< Phrase, int > &  allngrams 
)

Definition at line 35 of file LatticeMBR.cpp.

References Moses::Phrase::AddWord(), and bleu_order.

Referenced by doConsensusDecoding(), and doMBR().

Here is the call graph for this function:

Here is the caller graph for this function:

void getLatticeMBRNBest ( Manager manager,
TrellisPathList nBestList,
vector< LatticeMBRSolution > &  solutions,
size_t  n 
)

void GetOutputWords ( const TrellisPath path,
vector< Word > &  translation 
)

Definition at line 19 of file LatticeMBR.cpp.

References Moses::Hypothesis::GetCurrTargetPhrase(), Moses::TrellisPath::GetEdges(), Moses::Phrase::GetSize(), and Moses::Phrase::GetWord().

Referenced by doConsensusDecoding().

Here is the call graph for this function:

Here is the caller graph for this function:

ostream& operator<< ( ostream &  out,
const Edge edge 
)

Definition at line 488 of file LatticeMBR.cpp.

References Moses::Hypothesis::GetId().

Here is the call graph for this function:

void pruneLatticeFB ( Lattice connectedHyp,
map< const Hypothesis *, set< const Hypothesis * > > &  outgoingHyps,
map< const Hypothesis *, vector< Edge > > &  incomingEdges,
const vector< float > &  estimatedScores,
const Hypothesis bestHypo,
size_t  edgeDensity,
float  scale 
)


Variable Documentation

size_t bleu_order = 4

Definition at line 17 of file LatticeMBR.cpp.

Referenced by calcNgramExpectations(), extract_ngrams(), and getLatticeMBRNBest().

float UNKNGRAMLOGPROB = -20

Definition at line 18 of file LatticeMBR.cpp.


Generated on Wed Feb 8 07:04:09 2012 for Moses by  doxygen 1.5.9