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

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <stdio.h>
#include "TrellisPathList.h"
#include "TrellisPath.h"
#include "StaticData.h"
#include "Util.h"
#include "mbr.h"

Go to the source code of this file.

Functions

void extract_ngrams (const vector< const Factor * > &sentence, map< vector< const Factor * >, int > &allngrams)
float calculate_score (const vector< vector< const Factor * > > &sents, int ref, int hyp, vector< map< vector< const Factor * >, int > > &ngram_stats)
const TrellisPath doMBR (const TrellisPathList &nBestList)
void GetOutputFactors (const TrellisPath &path, vector< const Factor * > &translation)

Variables

int BLEU_ORDER = 4
int SMOOTH = 1
float min_interval = 1e-4


Function Documentation

float calculate_score ( const vector< vector< const Factor * > > &  sents,
int  ref,
int  hyp,
vector< map< vector< const Factor * >, int > > &  ngram_stats 
)

Definition at line 52 of file mbr.cpp.

References BLEU_ORDER, and SMOOTH.

Referenced by doMBR().

Here is the caller graph for this function:

const TrellisPath doMBR ( const TrellisPathList nBestList  ) 

void extract_ngrams ( const vector< const Factor * > &  sentence,
map< vector< const Factor * >, int > &  allngrams 
)

Definition at line 38 of file mbr.cpp.

References BLEU_ORDER.

void GetOutputFactors ( const TrellisPath path,
vector< const Factor * > &  translation 
)

Definition at line 160 of file mbr.cpp.

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

Here is the call graph for this function:


Variable Documentation

int BLEU_ORDER = 4

Definition at line 35 of file mbr.cpp.

Referenced by calculate_score(), doConsensusDecoding(), and extract_ngrams().

float min_interval = 1e-4

Definition at line 37 of file mbr.cpp.

int SMOOTH = 1

Definition at line 36 of file mbr.cpp.

Referenced by calculate_score(), and doConsensusDecoding().


Generated on Tue Feb 7 18:04:08 2012 for Moses by  doxygen 1.5.9