kgrams  0.1.0
Classes | Public Member Functions | List of all members
DictionaryR Class Reference
Inheritance diagram for DictionaryR:
Inheritance graph
[legend]
Collaboration diagram for DictionaryR:
Collaboration graph
[legend]

Public Member Functions

 DictionaryR (CharacterVector word_list)
 
 DictionaryR (kgramFreqs &f)
 
LogicalVector query (CharacterVector word) const
 
void insert (CharacterVector word_list)
 
void insert_cover (Rcpp::CharacterVector text, double target)
 
void insert_n (Rcpp::CharacterVector text, size_t n)
 
void insert_above (Rcpp::CharacterVector text, size_t thresh)
 
- Public Member Functions inherited from Dictionary
 Dictionary ()
 Default constructor. More...
 
 Dictionary (const std::vector< std::string > &dict)
 Initialize Dictionary from list of words. More...
 
bool contains (std::string word) const
 Check if a word is contained in the Dictionary. More...
 
void insert (std::string word)
 Insert a word in the Dictionary. More...
 
std::string word (std::string index) const
 Return the word corresponding to a given word index. More...
 
std::string index (std::string word) const
 Return the index corresponding to a given word. More...
 
size_t length () const
 Return size of the dictionary, excluding the special tokens (BOS, EOS, UNK). More...
 
size_t size () const
 Return size of the dictionary, excluding the special tokens (BOS, EOS, UNK). More...
 
std::pair< size_t, std::string > kgram_code (std::string kgram) const
 Extract k-gram code from a string. More...
 

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