librime 1.2
Rime Input Method Engine, the core library
rime::UnityTableEncoder Class Reference

#include <unity_table_encoder.h>

Inheritance diagram for rime::UnityTableEncoder:
Collaboration diagram for rime::UnityTableEncoder:

Public Member Functions

 UnityTableEncoder (UserDictionary *user_dict)
 ~UnityTableEncoder ()
bool Load (const Ticket &ticket)
void CreateEntry (const string &word, const string &code_str, const string &weight_str)
bool TranslateWord (const string &word, vector< string > *code)
size_t LookupPhrases (UserDictEntryIterator *result, const string &input, bool predictive, size_t limit=0, string *resume_key=NULL)
Public Member Functions inherited from rime::TableEncoder
 TableEncoder (PhraseCollector *collector=NULL)
bool LoadSettings (Config *config)
bool Encode (const RawCode &code, string *result)
bool EncodePhrase (const string &phrase, const string &value)
bool IsCodeExcluded (const string &code)
bool loaded () const
const vector< TableEncodingRule > & encoding_rules () const
const string & tail_anchor () const
Public Member Functions inherited from rime::Encoder
 Encoder (PhraseCollector *collector)
virtual ~Encoder ()=default
void set_collector (PhraseCollector *collector)
Public Member Functions inherited from rime::PhraseCollector
 PhraseCollector ()=default
virtual ~PhraseCollector ()=default

Static Public Member Functions

static bool HasPrefix (const string &key)
static bool AddPrefix (string *key)
static bool RemovePrefix (string *key)

Protected Attributes

UserDictionaryuser_dict_
the< ReverseLookupDictionaryrev_dict_
Protected Attributes inherited from rime::TableEncoder
bool loaded_
vector< TableEncodingRuleencoding_rules_
vector< boost::regex > exclude_patterns_
string tail_anchor_
int max_phrase_length_
Protected Attributes inherited from rime::Encoder
PhraseCollectorcollector_

Additional Inherited Members

Protected Member Functions inherited from rime::TableEncoder
bool ParseFormula (const string &formula, TableEncodingRule *rule)
int CalculateCodeIndex (const string &code, int index, int start)
bool DfsEncode (const string &phrase, const string &value, size_t start_pos, RawCode *code, int *limit)

Constructor & Destructor Documentation

◆ UnityTableEncoder()

rime::UnityTableEncoder::UnityTableEncoder ( UserDictionary * user_dict)

◆ ~UnityTableEncoder()

rime::UnityTableEncoder::~UnityTableEncoder ( )

Member Function Documentation

◆ AddPrefix()

bool rime::UnityTableEncoder::AddPrefix ( string * key)
static

◆ CreateEntry()

void rime::UnityTableEncoder::CreateEntry ( const string & word,
const string & code_str,
const string & weight_str )
virtual

Implements rime::PhraseCollector.

◆ HasPrefix()

bool rime::UnityTableEncoder::HasPrefix ( const string & key)
static

◆ Load()

bool rime::UnityTableEncoder::Load ( const Ticket & ticket)

◆ LookupPhrases()

size_t rime::UnityTableEncoder::LookupPhrases ( UserDictEntryIterator * result,
const string & input,
bool predictive,
size_t limit = 0,
string * resume_key = NULL )

◆ RemovePrefix()

bool rime::UnityTableEncoder::RemovePrefix ( string * key)
static

◆ TranslateWord()

bool rime::UnityTableEncoder::TranslateWord ( const string & word,
vector< string > * code )
virtual

Implements rime::PhraseCollector.

Member Data Documentation

◆ rev_dict_

the<ReverseLookupDictionary> rime::UnityTableEncoder::rev_dict_
protected

◆ user_dict_

UserDictionary* rime::UnityTableEncoder::user_dict_
protected

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