Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
lm Namespace Reference

Packages

namespace  anonymous_namespace{read_arpa.cc}
namespace  base
namespace  ngram
namespace  sri

Classes

class  ConfigException
class  LoadException
class  FormatLoadException
class  VocabLoadException
class  SpecialWordMissingException
class  PositiveProbWarn
struct  FullScoreReturn
struct  Prob
struct  ProbBackoff

Typedefs

typedef unsigned int WordIndex

Enumerations

enum  WarningAction { THROW_UP, COMPLAIN, SILENT }

Functions

void ReadARPACounts (util::FilePiece &in, std::vector< uint64_t > &number)
void ReadNGramHeader (util::FilePiece &in, unsigned int length)
void ReadBackoff (util::FilePiece &in, Prob &)
void ReadBackoff (util::FilePiece &in, ProbBackoff &weights)
void ReadEnd (util::FilePiece &in)
template<class Voc >
void Read1Gram (util::FilePiece &f, Voc &vocab, ProbBackoff *unigrams, PositiveProbWarn &warn)
template<class Voc >
void Read1Grams (util::FilePiece &f, std::size_t count, Voc &vocab, ProbBackoff *unigrams, PositiveProbWarn &warn)
template<class Voc , class Weights >
void ReadNGram (util::FilePiece &f, const unsigned char n, const Voc &vocab, WordIndex *const reverse_indices, Weights &weights, PositiveProbWarn &warn)

Variables

const bool kARPASpaces [256] = {0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

Typedef Documentation

typedef unsigned int lm::WordIndex

Enumeration Type Documentation

Enumerator:
THROW_UP 
COMPLAIN 
SILENT 

Function Documentation

template<class Voc >
void lm::Read1Gram ( util::FilePiece f,
Voc &  vocab,
ProbBackoff *  unigrams,
PositiveProbWarn &  warn 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Voc >
void lm::Read1Grams ( util::FilePiece f,
std::size_t  count,
Voc &  vocab,
ProbBackoff *  unigrams,
PositiveProbWarn &  warn 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ReadARPACounts ( util::FilePiece in,
std::vector< uint64_t > &  number 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ReadBackoff ( util::FilePiece in,
Prob &   
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ReadBackoff ( util::FilePiece in,
ProbBackoff &  weights 
)

Here is the call graph for this function:

void lm::ReadEnd ( util::FilePiece in)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Voc , class Weights >
void lm::ReadNGram ( util::FilePiece f,
const unsigned char  n,
const Voc &  vocab,
WordIndex *const  reverse_indices,
Weights &  weights,
PositiveProbWarn &  warn 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ReadNGramHeader ( util::FilePiece in,
unsigned int  length 
)

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const bool lm::kARPASpaces = {0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}