Cambridge SMT System
ucam::fsttools::BleuScorer Class Reference

#include <bleu.hpp>

Public Types

typedef std::vector< WidNGram
 
typedef unordered_map< NGram, unsigned int, ucam::util::hashfvecint64, ucam::util::hasheqvecint64NGramToCountMap
 

Public Member Functions

 BleuScorer (std::string const &refFiles, std::string const &extTokCmd, unsigned int const &cacheSize, bool const &intRefs, std::string const &wordMapFile)
 
void LoadReferences (std::string const &refFiles)
 
string CacheStats ()
 
unsigned int ClosestReferenceLength (Sid sid, const unsigned int hypLength) const
 
BleuStats SentenceBleuStats (const Sid sid, const SentenceIdx &hypIdx)
 
Bleu ComputeBleu (const BleuStats &bs)
 
Bleu ComputeSBleu (const BleuStats &bs)
 
NGram SubStr (const SentenceIdx &s, const unsigned int n, const unsigned int l) const
 
NGramToCountMap ScanNGrams (SentenceIdx const &ref) const
 

Public Attributes

std::vector< NGramToCountMaprefCounts
 
std::vector< std::vector< unsigned int > > refLengths
 

Detailed Description

Definition at line 165 of file bleu.hpp.

Member Typedef Documentation

typedef std::vector<Wid> ucam::fsttools::BleuScorer::NGram

Definition at line 167 of file bleu.hpp.

Definition at line 170 of file bleu.hpp.

Constructor & Destructor Documentation

ucam::fsttools::BleuScorer::BleuScorer ( std::string const &  refFiles,
std::string const &  extTokCmd,
unsigned int const &  cacheSize,
bool const &  intRefs,
std::string const &  wordMapFile 
)
inline

Definition at line 174 of file bleu.hpp.

Member Function Documentation

string ucam::fsttools::BleuScorer::CacheStats ( )
inline

Definition at line 274 of file bleu.hpp.

unsigned int ucam::fsttools::BleuScorer::ClosestReferenceLength ( Sid  sid,
const unsigned int  hypLength 
) const
inline

Definition at line 282 of file bleu.hpp.

Bleu ucam::fsttools::BleuScorer::ComputeBleu ( const BleuStats bs)
inline

Definition at line 326 of file bleu.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Bleu ucam::fsttools::BleuScorer::ComputeSBleu ( const BleuStats bs)
inline

Definition at line 338 of file bleu.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ucam::fsttools::BleuScorer::LoadReferences ( std::string const &  refFiles)
inline

Definition at line 225 of file bleu.hpp.

Here is the call graph for this function:

NGramToCountMap ucam::fsttools::BleuScorer::ScanNGrams ( SentenceIdx const &  ref) const
inline

Definition at line 356 of file bleu.hpp.

Here is the call graph for this function:

BleuStats ucam::fsttools::BleuScorer::SentenceBleuStats ( const Sid  sid,
const SentenceIdx hypIdx 
)
inline

Definition at line 296 of file bleu.hpp.

Here is the caller graph for this function:

NGram ucam::fsttools::BleuScorer::SubStr ( const SentenceIdx s,
const unsigned int  n,
const unsigned int  l 
) const
inline

Definition at line 351 of file bleu.hpp.

Member Data Documentation

std::vector<NGramToCountMap> ucam::fsttools::BleuScorer::refCounts

Definition at line 171 of file bleu.hpp.

std::vector< std::vector<unsigned int> > ucam::fsttools::BleuScorer::refLengths

Definition at line 172 of file bleu.hpp.


The documentation for this class was generated from the following file: