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

#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< WorddoLatticeMBR (Manager &manager, TrellisPathList &nBestList)
const TrellisPath doConsensusDecoding (Manager &manager, TrellisPathList &nBestList)


Typedef Documentation

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.

typedef std::vector<const Edge*> Path

Definition at line 27 of file LatticeMBR.h.

typedef std::map<Path, size_t> PathCounts

Definition at line 28 of file LatticeMBR.h.


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,
std::map< const Hypothesis *, std::vector< Edge > > &  incomingEdges,
std::map< Phrase, float > &  finalNgramScores,
bool  posteriors 
)

const TrellisPath doConsensusDecoding ( Manager manager,
TrellisPathList nBestList 
)

std::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 std::vector< Word > &  sentence,
std::map< Phrase, int > &  allngrams 
)

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

void GetOutputFactors ( const TrellisPath path,
std::vector< Word > &  translation 
)

Referenced by doMBR().

Here is the caller graph for this function:

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 
)


Generated on Wed Feb 8 06:04:10 2012 for Moses by  doxygen 1.5.9