OnlineRLM< T > Class Template Reference

#include <onlineRLM.h>

Inheritance diagram for OnlineRLM< T >:

Inheritance graph
[legend]
Collaboration diagram for OnlineRLM< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 OnlineRLM (uint16_t MBs, int width, int bucketRange, count_t order, Moses::Vocab *v, float qBase=8)
 OnlineRLM (Moses::FileHandler *fin, count_t order)
 ~OnlineRLM ()
float getProb (const wordID_t *ngram, int len, const void **state)
bool insert (const std::vector< std::string > &ngram, const int value)
bool update (const std::vector< std::string > &ngram, const int value)
int query (const wordID_t *IDs, const int len)
int sbsqQuery (const std::vector< std::string > &ngram, int *len, bool bStrict=false)
int sbsqQuery (const wordID_t *IDs, const int len, int *codes, bool bStrict=false)
void remove (const std::vector< std::string > &ngram)
count_t heurDelete (count_t num2del, count_t order=5)
uint64_t corpusSize ()
void corpusSize (uint64_t c)
void clearCache ()
void save (Moses::FileHandler *fout)
void load (Moses::FileHandler *fin)
void randDelete (int num2del)
int countHits ()
int countPrefixes ()
int cleanUpHPD ()
void clearMarkings ()
void removeNonMarked ()

Public Attributes

Moses::Vocabvocab_

Protected Member Functions

void markQueried (const uint64_t &index)
void markQueried (hpdEntry_t &value)
bool markPrefix (const wordID_t *IDs, const int len, bool bSet)


Detailed Description

template<typename T>
class OnlineRLM< T >

Todo:
ask abby2

Definition at line 21 of file onlineRLM.h.


Constructor & Destructor Documentation

template<typename T>
OnlineRLM< T >::OnlineRLM ( uint16_t  MBs,
int  width,
int  bucketRange,
count_t  order,
Moses::Vocab v,
float  qBase = 8 
) [inline]

Definition at line 24 of file onlineRLM.h.

References PerfectHash< T >::cells_, UTIL_THROW_IF2, and OnlineRLM< T >::vocab_.

template<typename T>
OnlineRLM< T >::OnlineRLM ( Moses::FileHandler fin,
count_t  order 
) [inline]

Definition at line 37 of file onlineRLM.h.

References OnlineRLM< T >::load().

Here is the call graph for this function:

template<typename T>
OnlineRLM< T >::~OnlineRLM (  )  [inline]

Definition at line 45 of file onlineRLM.h.

References NULL, and OnlineRLM< T >::vocab_.


Member Function Documentation

template<typename T >
int OnlineRLM< T >::cleanUpHPD (  )  [inline]

Definition at line 391 of file onlineRLM.h.

References PerfectHash< T >::dict_, iterate, and Utils::splitToStr().

Referenced by OnlineRLM< T >::removeNonMarked().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T>
void OnlineRLM< T >::clearCache (  )  [inline]

Definition at line 70 of file onlineRLM.h.

References randlm::Cache< T >::clear().

Here is the call graph for this function:

template<typename T >
void OnlineRLM< T >::clearMarkings (  )  [inline]

Definition at line 408 of file onlineRLM.h.

References PerfectHash< T >::dict_, PerfectHash< T >::hitMask_, iterate, and randlm::Filter< T >::reset().

Here is the call graph for this function:

template<typename T>
void OnlineRLM< T >::corpusSize ( uint64_t  c  )  [inline]

Definition at line 67 of file onlineRLM.h.

template<typename T>
uint64_t OnlineRLM< T >::corpusSize (  )  [inline]

Definition at line 64 of file onlineRLM.h.

template<typename T >
int OnlineRLM< T >::countHits (  )  [inline]

Definition at line 367 of file onlineRLM.h.

References PerfectHash< T >::cells_, PerfectHash< T >::dict_, iterate, and randlm::BitFilter::testBit().

Here is the call graph for this function:

template<typename T >
int OnlineRLM< T >::countPrefixes (  )  [inline]

Definition at line 380 of file onlineRLM.h.

References PerfectHash< T >::cells_, and randlm::BitFilter::testBit().

Here is the call graph for this function:

template<typename T >
float OnlineRLM< T >::getProb ( const wordID_t ngram,
int  len,
const void **  state 
) [inline]

template<typename T >
count_t OnlineRLM< T >::heurDelete ( count_t  num2del,
count_t  order = 5 
) [inline]

template<typename T >
bool OnlineRLM< T >::insert ( const std::vector< std::string > &  ngram,
const int  value 
) [inline]

template<typename T >
void OnlineRLM< T >::load ( Moses::FileHandler fin  )  [inline]

Reimplemented from PerfectHash< T >.

Definition at line 435 of file onlineRLM.h.

References UTIL_THROW_IF2, and OnlineRLM< T >::vocab_.

Referenced by OnlineRLM< T >::OnlineRLM().

Here is the caller graph for this function:

template<typename T >
bool OnlineRLM< T >::markPrefix ( const wordID_t IDs,
const int  len,
bool  bSet 
) [inline, protected]

template<typename T >
void OnlineRLM< T >::markQueried ( hpdEntry_t value  )  [inline, protected, virtual]

Implements PerfectHash< T >.

Definition at line 196 of file onlineRLM.h.

References PerfectHash< T >::hitMask_.

template<typename T >
void OnlineRLM< T >::markQueried ( const uint64_t &  index  )  [inline, protected, virtual]

Implements PerfectHash< T >.

Definition at line 189 of file onlineRLM.h.

References randlm::BitFilter::setBit().

Referenced by OnlineRLM< T >::insert(), and OnlineRLM< T >::update().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
int OnlineRLM< T >::query ( const wordID_t IDs,
const int  len 
) [inline]

Definition at line 140 of file onlineRLM.h.

References PerfectHash< T >::cells_, PerfectHash< T >::dict_, PerfectHash< T >::hitMask_, and UTIL_THROW_IF2.

Referenced by OnlineRLM< T >::getProb(), OnlineRLM< T >::markPrefix(), and OnlineRLM< T >::sbsqQuery().

Here is the caller graph for this function:

template<typename T >
void OnlineRLM< T >::randDelete ( int  num2del  )  [inline]

Definition at line 354 of file onlineRLM.h.

References PerfectHash< T >::cells_, PerfectHash< T >::filter_, and OnlineRLM< T >::remove().

Here is the call graph for this function:

template<typename T >
void OnlineRLM< T >::remove ( const std::vector< std::string > &  ngram  )  [inline]

Definition at line 203 of file onlineRLM.h.

References Moses::Vocab::GetWordID(), and OnlineRLM< T >::vocab_.

Referenced by OnlineRLM< T >::heurDelete(), OnlineRLM< T >::randDelete(), and OnlineRLM< T >::removeNonMarked().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void OnlineRLM< T >::removeNonMarked (  )  [inline]

Definition at line 452 of file onlineRLM.h.

References PerfectHash< T >::cells_, OnlineRLM< T >::cleanUpHPD(), PerfectHash< T >::filter_, OnlineRLM< T >::remove(), and randlm::BitFilter::testBit().

Here is the call graph for this function:

template<typename T >
void OnlineRLM< T >::save ( Moses::FileHandler fout  )  [inline]

Reimplemented from PerfectHash< T >.

Definition at line 420 of file onlineRLM.h.

References randlm::BitFilter::save(), Moses::Vocab::Save(), and OnlineRLM< T >::vocab_.

Here is the call graph for this function:

template<typename T >
int OnlineRLM< T >::sbsqQuery ( const wordID_t IDs,
const int  len,
int *  codes,
bool  bStrict = false 
) [inline]

Definition at line 254 of file onlineRLM.h.

References PerfectHash< T >::dict_, PerfectHash< T >::hitMask_, and OnlineRLM< T >::query().

Here is the call graph for this function:

template<typename T >
int OnlineRLM< T >::sbsqQuery ( const std::vector< std::string > &  ngram,
int *  len,
bool  bStrict = false 
) [inline]

Definition at line 244 of file onlineRLM.h.

References Moses::Vocab::GetWordID(), and OnlineRLM< T >::vocab_.

Here is the call graph for this function:

template<typename T >
bool OnlineRLM< T >::update ( const std::vector< std::string > &  ngram,
const int  value 
) [inline]


Member Data Documentation

template<typename T>
Moses::Vocab* OnlineRLM< T >::vocab_


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

Generated on Mon Aug 17 00:32:12 2015 for Moses by  doxygen 1.5.9