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

Packages

namespace  anonymous_namespace{binary_format.cc}
namespace  anonymous_namespace{build_binary.cc}
namespace  anonymous_namespace{model_test.cc}
namespace  anonymous_namespace{quantize.cc}
namespace  anonymous_namespace{search_hashed.cc}
namespace  anonymous_namespace{vocab.cc}
namespace  detail
namespace  trie

Classes

struct  FixedWidthParameters
struct  Parameters
struct  Backing
struct  Config
class  EnumerateVocab
class  State
class  DontQuantize
class  SeparatelyQuantize
class  WriteWordsWrapper
class  SortedVocabulary
class  ProbingVocabulary

Typedefs

typedef
::lm::ngram::ProbingVocabulary 
Vocabulary
typedef detail::GenericModel
< detail::ProbingHashedSearch,
Vocabulary
ProbingModel
typedef ProbingModel Model
typedef
::lm::ngram::SortedVocabulary 
SortedVocabulary
typedef detail::GenericModel
< trie::TrieSearch
< DontQuantize,
trie::DontBhiksha >
, SortedVocabulary
TrieModel
typedef detail::GenericModel
< trie::TrieSearch
< DontQuantize,
trie::ArrayBhiksha >
, SortedVocabulary
ArrayTrieModel
typedef detail::GenericModel
< trie::TrieSearch
< SeparatelyQuantize,
trie::DontBhiksha >
, SortedVocabulary
QuantTrieModel
typedef detail::GenericModel
< trie::TrieSearch
< SeparatelyQuantize,
trie::ArrayBhiksha >
, SortedVocabulary
QuantArrayTrieModel

Enumerations

enum  ModelType {
  HASH_PROBING = 0, HASH_SORTED = 1, TRIE_SORTED = 2, QUANT_TRIE_SORTED = 3,
  ARRAY_TRIE_SORTED = 4, QUANT_ARRAY_TRIE_SORTED = 5
}

Functions

void SeekOrThrow (int fd, off_t off)
void AdvanceOrThrow (int fd, off_t off)
uint8_t * SetupJustVocab (const Config &config, uint8_t order, std::size_t memory_size, Backing &backing)
uint8_t * GrowForSearch (const Config &config, std::size_t vocab_pad, std::size_t memory_size, Backing &backing)
void FinishFile (const Config &config, ModelType model_type, const std::vector< uint64_t > &counts, Backing &backing)
bool RecognizeBinary (const char *file, ModelType &recognized)
template<class To >
void LoadLM (const char *file, const Config &config, To &to)
void SetExtension (float &backoff)
bool HasExtension (const float &backoff)
size_t hash_value (const State &state)
std::ostream & operator<< (std::ostream &o, const State &state)
void MissingUnknown (const Config &config) throw (SpecialWordMissingException)
void MissingSentenceMarker (const Config &config, const char *str) throw (SpecialWordMissingException)
template<class Vocab >
void CheckSpecials (const Config &config, const Vocab &vocab) throw (SpecialWordMissingException)

Variables

const float kNoExtensionBackoff = -0.0
const float kExtensionBackoff = 0.0
const uint64_t kNoExtensionQuant = 0
const uint64_t kExtensionQuant = 1
const float kBlankProb = -std::numeric_limits<float>::infinity()
const float kBlankBackoff = kNoExtensionBackoff
const uint32_t kBlankProbQuant = 0
const uint32_t kBlankBackoffQuant = 0
const unsigned char kMaxOrder = 6

Typedef Documentation


Enumeration Type Documentation

Enumerator:
HASH_PROBING 
HASH_SORTED 
TRIE_SORTED 
QUANT_TRIE_SORTED 
ARRAY_TRIE_SORTED 
QUANT_ARRAY_TRIE_SORTED 

Function Documentation

void lm::ngram::AdvanceOrThrow ( int  fd,
off_t  off 
)

Here is the caller graph for this function:

template<class Vocab >
void lm::ngram::CheckSpecials ( const Config &  config,
const Vocab &  vocab 
) throw (SpecialWordMissingException)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::FinishFile ( const Config &  config,
ModelType  model_type,
const std::vector< uint64_t > &  counts,
Backing &  backing 
)

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t * lm::ngram::GrowForSearch ( const Config &  config,
std::size_t  vocab_pad,
std::size_t  memory_size,
Backing &  backing 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool lm::ngram::HasExtension ( const float &  backoff)

Here is the caller graph for this function:

size_t lm::ngram::hash_value ( const State &  state)

Here is the call graph for this function:

template<class To >
void lm::ngram::LoadLM ( const char *  file,
const Config &  config,
To &  to 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::MissingSentenceMarker ( const Config &  config,
const char *  str 
) throw (SpecialWordMissingException)

Here is the caller graph for this function:

void lm::ngram::MissingUnknown ( const Config &  config) throw (SpecialWordMissingException)

Here is the caller graph for this function:

std::ostream& lm::ngram::operator<< ( std::ostream &  o,
const State &  state 
)
bool lm::ngram::RecognizeBinary ( const char *  file,
ModelType &  recognized 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::SeekOrThrow ( int  fd,
off_t  off 
)

Here is the caller graph for this function:

void lm::ngram::SetExtension ( float &  backoff)

Here is the caller graph for this function:

uint8_t * lm::ngram::SetupJustVocab ( const Config &  config,
uint8_t  order,
std::size_t  memory_size,
Backing &  backing 
)

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const uint32_t lm::ngram::kBlankBackoffQuant = 0
const float lm::ngram::kBlankProb = -std::numeric_limits<float>::infinity()
const uint32_t lm::ngram::kBlankProbQuant = 0
const float lm::ngram::kExtensionBackoff = 0.0
const uint64_t lm::ngram::kExtensionQuant = 1
const unsigned char lm::ngram::kMaxOrder = 6
const float lm::ngram::kNoExtensionBackoff = -0.0
const uint64_t lm::ngram::kNoExtensionQuant = 0