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

#include <preset_vocabulary.h>

Public Member Functions

 PresetVocabulary (const string &vocabulary)
 ~PresetVocabulary ()
bool GetWeightForEntry (const string &key, double *weight)
void Reset ()
bool GetNextEntry (string *key, string *value)
bool IsQualifiedPhrase (const string &phrase, const string &weight_str)
void set_max_phrase_length (int length)
void set_min_phrase_weight (double weight)

Static Public Member Functions

static path DictFilePath (const string &vacabulary)

Protected Attributes

the< VocabularyDbdb_
int max_phrase_length_ = 0
double min_phrase_weight_ = 0.0

Constructor & Destructor Documentation

◆ PresetVocabulary()

rime::PresetVocabulary::PresetVocabulary ( const string & vocabulary)
explicit

◆ ~PresetVocabulary()

rime::PresetVocabulary::~PresetVocabulary ( )

Member Function Documentation

◆ DictFilePath()

path rime::PresetVocabulary::DictFilePath ( const string & vacabulary)
static

◆ GetNextEntry()

bool rime::PresetVocabulary::GetNextEntry ( string * key,
string * value )

◆ GetWeightForEntry()

bool rime::PresetVocabulary::GetWeightForEntry ( const string & key,
double * weight )

◆ IsQualifiedPhrase()

bool rime::PresetVocabulary::IsQualifiedPhrase ( const string & phrase,
const string & weight_str )

◆ Reset()

void rime::PresetVocabulary::Reset ( )

◆ set_max_phrase_length()

void rime::PresetVocabulary::set_max_phrase_length ( int length)
inline

◆ set_min_phrase_weight()

void rime::PresetVocabulary::set_min_phrase_weight ( double weight)
inline

Member Data Documentation

◆ db_

the<VocabularyDb> rime::PresetVocabulary::db_
protected

◆ max_phrase_length_

int rime::PresetVocabulary::max_phrase_length_ = 0
protected

◆ min_phrase_weight_

double rime::PresetVocabulary::min_phrase_weight_ = 0.0
protected

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