Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
lm::ngram::trie::anonymous_namespace{search_trie.cc} Namespace Reference

Classes

class  EntryIterator
class  EntryProxy
class  PartialViewProxy
class  CompareRecords
class  SortedFileReader
class  ContextReader
class  JustCount
class  WriteEntries
class  RecursiveInsert

Typedefs

typedef util::ProxyIterator
< EntryProxy
NGramIter
typedef util::ProxyIterator
< PartialViewProxy
PartialIter

Functions

FILE * OpenOrThrow (const char *name, const char *mode)
void WriteOrThrow (FILE *to, const void *data, size_t size)
void ReadOrThrow (FILE *from, void *data, size_t size)
void CopyOrThrow (FILE *from, FILE *to, size_t size)
void CopyRestOrThrow (FILE *from, FILE *to)
void RemoveOrThrow (const char *name)
std::string DiskFlush (const void *mem_begin, const void *mem_end, const std::string &file_prefix, std::size_t batch, unsigned char order, std::size_t weights_size)
void CopyFullRecord (SortedFileReader &from, FILE *to, std::size_t weights_size)
void MergeSortedFiles (const std::string &first_name, const std::string &second_name, const std::string &out, std::size_t weights_size, unsigned char order)
void WriteContextFile (uint8_t *begin, uint8_t *end, const std::string &ngram_file_name, std::size_t entry_size, unsigned char order)
void MergeContextFiles (const std::string &first_base, const std::string &second_base, const std::string &out_base, unsigned char order)
void ConvertToSorted (util::FilePiece &f, const SortedVocabulary &vocab, const std::vector< uint64_t > &counts, util::scoped_memory &mem, const std::string &file_prefix, unsigned char order, PositiveProbWarn &warn)
void ARPAToSortedFiles (const Config &config, util::FilePiece &f, std::vector< uint64_t > &counts, size_t buffer, const std::string &file_prefix, SortedVocabulary &vocab)
bool HeadMatch (const WordIndex *words, const WordIndex *const words_end, const WordIndex *header)
void SanityCheckCounts (const std::vector< uint64_t > &initial, const std::vector< uint64_t > &fixed)
bool IsDirectory (const char *path)
template<class Quant >
void TrainQuantizer (uint8_t order, uint64_t count, SortedFileReader &reader, util::ErsatzProgress &progress, Quant &quant)
template<class Quant >
void TrainProbQuantizer (uint8_t order, uint64_t count, SortedFileReader &reader, util::ErsatzProgress &progress, Quant &quant)

Variables

const std::size_t kCopyBufSize = 512
const char * kContextSuffix = "_contexts"

Typedef Documentation

typedef util::ProxyIterator<EntryProxy> lm::ngram::trie::anonymous_namespace{search_trie.cc}::NGramIter
typedef util::ProxyIterator<PartialViewProxy> lm::ngram::trie::anonymous_namespace{search_trie.cc}::PartialIter

Function Documentation

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::ARPAToSortedFiles ( const Config &  config,
util::FilePiece f,
std::vector< uint64_t > &  counts,
size_t  buffer,
const std::string &  file_prefix,
SortedVocabulary &  vocab 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::ConvertToSorted ( util::FilePiece f,
const SortedVocabulary &  vocab,
const std::vector< uint64_t > &  counts,
util::scoped_memory mem,
const std::string &  file_prefix,
unsigned char  order,
PositiveProbWarn &  warn 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::CopyFullRecord ( SortedFileReader &  from,
FILE *  to,
std::size_t  weights_size 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::CopyOrThrow ( FILE *  from,
FILE *  to,
size_t  size 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::CopyRestOrThrow ( FILE *  from,
FILE *  to 
)

Here is the call graph for this function:

Here is the caller graph for this function:

std::string lm::ngram::trie::anonymous_namespace{search_trie.cc}::DiskFlush ( const void *  mem_begin,
const void *  mem_end,
const std::string &  file_prefix,
std::size_t  batch,
unsigned char  order,
std::size_t  weights_size 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool lm::ngram::trie::anonymous_namespace{search_trie.cc}::HeadMatch ( const WordIndex *  words,
const WordIndex *const  words_end,
const WordIndex *  header 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool lm::ngram::trie::anonymous_namespace{search_trie.cc}::IsDirectory ( const char *  path)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::MergeContextFiles ( const std::string &  first_base,
const std::string &  second_base,
const std::string &  out_base,
unsigned char  order 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::MergeSortedFiles ( const std::string &  first_name,
const std::string &  second_name,
const std::string &  out,
std::size_t  weights_size,
unsigned char  order 
)

Here is the call graph for this function:

Here is the caller graph for this function:

FILE* lm::ngram::trie::anonymous_namespace{search_trie.cc}::OpenOrThrow ( const char *  name,
const char *  mode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::ReadOrThrow ( FILE *  from,
void *  data,
size_t  size 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::RemoveOrThrow ( const char *  name)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::SanityCheckCounts ( const std::vector< uint64_t > &  initial,
const std::vector< uint64_t > &  fixed 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Quant >
void lm::ngram::trie::anonymous_namespace{search_trie.cc}::TrainProbQuantizer ( uint8_t  order,
uint64_t  count,
SortedFileReader &  reader,
util::ErsatzProgress progress,
Quant &  quant 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Quant >
void lm::ngram::trie::anonymous_namespace{search_trie.cc}::TrainQuantizer ( uint8_t  order,
uint64_t  count,
SortedFileReader &  reader,
util::ErsatzProgress progress,
Quant &  quant 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::WriteContextFile ( uint8_t *  begin,
uint8_t *  end,
const std::string &  ngram_file_name,
std::size_t  entry_size,
unsigned char  order 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::trie::anonymous_namespace{search_trie.cc}::WriteOrThrow ( FILE *  to,
const void *  data,
size_t  size 
)

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char* lm::ngram::trie::anonymous_namespace{search_trie.cc}::kContextSuffix = "_contexts"
const std::size_t lm::ngram::trie::anonymous_namespace{search_trie.cc}::kCopyBufSize = 512