lm::ngram::detail::HashedSearch< Value > Class Template Reference

#include <search_hashed.hh>

Collaboration diagram for lm::ngram::detail::HashedSearch< Value >:

Collaboration graph
[legend]

List of all members.

Classes

class  Unigram

Public Types

typedef uint64_t Node
typedef Value::ProbingProxy UnigramPointer
typedef Value::ProbingProxy MiddlePointer
typedef
::lm::ngram::detail::LongestPointer 
LongestPointer

Public Member Functions

uint8_t * SetupMemory (uint8_t *start, const std::vector< uint64_t > &counts, const Config &config)
void InitializeFromARPA (const char *file, util::FilePiece &f, const std::vector< uint64_t > &counts, const Config &config, ProbingVocabulary &vocab, BinaryFormat &backing)
unsigned char Order () const
Value::Weights & UnknownUnigram ()
UnigramPointer LookupUnigram (WordIndex word, Node &next, bool &independent_left, uint64_t &extend_left) const
MiddlePointer Unpack (uint64_t extend_pointer, unsigned char extend_length, Node &node) const
MiddlePointer LookupMiddle (unsigned char order_minus_2, WordIndex word, Node &node, bool &independent_left, uint64_t &extend_pointer) const
LongestPointer LookupLongest (WordIndex word, const Node &node) const
bool FastMakeNode (const WordIndex *begin, const WordIndex *end, Node &node) const
template<>
void DispatchBuild (util::FilePiece &f, const std::vector< uint64_t > &counts, const Config &config, const ProbingVocabulary &vocab, PositiveProbWarn &warn)
template<>
void DispatchBuild (util::FilePiece &f, const std::vector< uint64_t > &counts, const Config &config, const ProbingVocabulary &vocab, PositiveProbWarn &warn)

Static Public Member Functions

static void UpdateConfigFromBinary (const BinaryFormat &, const std::vector< uint64_t > &, uint64_t, Config &)
static uint64_t Size (const std::vector< uint64_t > &counts, const Config &config)

Static Public Attributes

static const ModelType kModelType = Value::kProbingModelType
static const bool kDifferentRest = Value::kDifferentRest
static const unsigned int kVersion = 0


Detailed Description

template<class Value>
class lm::ngram::detail::HashedSearch< Value >

Definition at line 62 of file search_hashed.hh.


Member Typedef Documentation

Definition at line 68 of file search_hashed.hh.

template<class Value >
typedef Value::ProbingProxy lm::ngram::detail::HashedSearch< Value >::MiddlePointer

Definition at line 67 of file search_hashed.hh.

template<class Value >
typedef uint64_t lm::ngram::detail::HashedSearch< Value >::Node

Definition at line 64 of file search_hashed.hh.

template<class Value >
typedef Value::ProbingProxy lm::ngram::detail::HashedSearch< Value >::UnigramPointer

Definition at line 66 of file search_hashed.hh.


Member Function Documentation

template<>
void lm::ngram::detail::HashedSearch< RestValue >::DispatchBuild ( util::FilePiece f,
const std::vector< uint64_t > &  counts,
const Config config,
const ProbingVocabulary vocab,
PositiveProbWarn warn 
) [inline]

template<>
void lm::ngram::detail::HashedSearch< BackoffValue >::DispatchBuild ( util::FilePiece f,
const std::vector< uint64_t > &  counts,
const Config config,
const ProbingVocabulary vocab,
PositiveProbWarn warn 
) [inline]

Definition at line 244 of file search_hashed.cc.

template<class Value >
bool lm::ngram::detail::HashedSearch< Value >::FastMakeNode ( const WordIndex begin,
const WordIndex end,
Node node 
) const [inline]

Definition at line 130 of file search_hashed.hh.

References lm::ngram::detail::CombineWordHash().

Here is the call graph for this function:

template<class Value >
void lm::ngram::detail::HashedSearch< Value >::InitializeFromARPA ( const char *  file,
util::FilePiece f,
const std::vector< uint64_t > &  counts,
const Config config,
ProbingVocabulary vocab,
BinaryFormat backing 
) [inline]

template<class Value >
LongestPointer lm::ngram::detail::HashedSearch< Value >::LookupLongest ( WordIndex  word,
const Node node 
) const [inline]

Definition at line 121 of file search_hashed.hh.

References lm::ngram::detail::CombineWordHash(), and util::ProbingHashTable< EntryT, HashT, EqualT, ModT >::Find().

Here is the call graph for this function:

template<class Value >
MiddlePointer lm::ngram::detail::HashedSearch< Value >::LookupMiddle ( unsigned char  order_minus_2,
WordIndex  word,
Node node,
bool &  independent_left,
uint64_t &  extend_pointer 
) const [inline]

Definition at line 108 of file search_hashed.hh.

References lm::ngram::detail::CombineWordHash().

Here is the call graph for this function:

template<class Value >
UnigramPointer lm::ngram::detail::HashedSearch< Value >::LookupUnigram ( WordIndex  word,
Node next,
bool &  independent_left,
uint64_t &  extend_left 
) const [inline]

Definition at line 95 of file search_hashed.hh.

template<class Value >
unsigned char lm::ngram::detail::HashedSearch< Value >::Order (  )  const [inline]

Definition at line 89 of file search_hashed.hh.

template<class Value >
uint8_t * lm::ngram::detail::HashedSearch< Value >::SetupMemory ( uint8_t *  start,
const std::vector< uint64_t > &  counts,
const Config config 
) [inline]

template<class Value >
static uint64_t lm::ngram::detail::HashedSearch< Value >::Size ( const std::vector< uint64_t > &  counts,
const Config config 
) [inline, static]

template<class Value >
Value::Weights& lm::ngram::detail::HashedSearch< Value >::UnknownUnigram (  )  [inline]

Definition at line 93 of file search_hashed.hh.

template<class Value >
MiddlePointer lm::ngram::detail::HashedSearch< Value >::Unpack ( uint64_t  extend_pointer,
unsigned char  extend_length,
Node node 
) const [inline]

Definition at line 103 of file search_hashed.hh.

template<class Value >
static void lm::ngram::detail::HashedSearch< Value >::UpdateConfigFromBinary ( const BinaryFormat ,
const std::vector< uint64_t > &  ,
uint64_t  ,
Config  
) [inline, static]

Definition at line 75 of file search_hashed.hh.


Member Data Documentation

template<class Value >
const bool lm::ngram::detail::HashedSearch< Value >::kDifferentRest = Value::kDifferentRest [static]

Definition at line 71 of file search_hashed.hh.

template<class Value >
const ModelType lm::ngram::detail::HashedSearch< Value >::kModelType = Value::kProbingModelType [static]

Definition at line 70 of file search_hashed.hh.

template<class Value >
const unsigned int lm::ngram::detail::HashedSearch< Value >::kVersion = 0 [static]

Definition at line 72 of file search_hashed.hh.


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

Generated on Thu Jul 6 00:32:47 2017 for Moses by  doxygen 1.5.9