librime: rime::TableTranslator Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Protected Attributes | List of all members
rime::TableTranslator Class Reference

`#include <table_translator.h>`

Inheritance diagram for rime::TableTranslator:
[legend]
Collaboration diagram for rime::TableTranslator:
[legend]

## Public Member Functions
| TableTranslator (const Ticket &ticket)
virtual an< Translation > | Query (const string &input, const Segment &segment)
virtual bool | Memorize (const CommitEntry &commit_entry)
an< Translation > | MakeSentence (const string &input, size_t start, bool include_prefix_phrases=false)
string | GetPrecedingText (size_t start) const
UnityTableEncoder * | encoder () const
Public Member Functions inherited from rime::Translator
| Translator (const Ticket &ticket)
virtual | ~Translator ()=default
string | name_space () const
Public Member Functions inherited from rime::Memory
| Memory (const Ticket &ticket)
virtual | ~Memory ()
virtual bool | ProcessSegmentOnCommit (CommitEntry &commit_entry, const Segment &seg)
bool | StartSession ()
bool | FinishSession ()
bool | DiscardSession ()
Dictionary * | dict () const
UserDictionary * | user_dict () const
const Language * | language () const
Public Member Functions inherited from rime::TranslatorOptions
| TranslatorOptions (const Ticket &ticket)
bool | IsUserDictDisabledFor (const string &input) const
const string & | delimiters () const
vector< string > | tags () const
void | set_tags (const vector< string > &tags)
const string & | tag () const
void | set_tag (const string &tag)
bool | contextual_suggestions () const
void | set_contextual_suggestions (bool enabled)
bool | enable_completion () const
void | set_enable_completion (bool enabled)
bool | strict_spelling () const
void | set_strict_spelling (bool is_strict)
double | initial_quality () const
void | set_initial_quality (double quality)
Projection & | preedit_formatter ()
Projection & | comment_formatter ()
const hash_set< string > & | blacklist ()

## Protected Attributes
bool | enable_charset_filter_ = false
bool | enable_encoder_ = false
bool | enable_sentence_ = true
bool | sentence_over_completion_ = false
bool | encode_commit_history_ = true
int | max_phrase_length_ = 5
int | max_homographs_ = 1
the< Poet > | poet_
the< UnityTableEncoder > | encoder_
Protected Attributes inherited from rime::Translator
Engine * | engine_
string | name_space_
Protected Attributes inherited from rime::Memory
the< Dictionary > | dict_
the< UserDictionary > | user_dict_
the< Language > | language_
Protected Attributes inherited from rime::TranslatorOptions
string | delimiters_
vector< string > | tags_ {"abc"}
bool | contextual_suggestions_ = false
bool | enable_completion_ = true
bool | strict_spelling_ = false
double | initial_quality_ = 0.
int | max_sentences_ = 1
double | sentence_cutoff_threshold_ = 0.1
Projection | preedit_formatter_
Projection | comment_formatter_
Patterns | user_dict_disabling_patterns_
hash_set< string > | blacklist_

## Additional Inherited Members
Public Types inherited from rime::Class< Translator, const Ticket & >
using | Initializer
Static Public Member Functions inherited from rime::Class< Translator, const Ticket & >
static Component * | Require (const string &name)
Protected Member Functions inherited from rime::Memory
void | OnCommit (Context *ctx)
void | OnDeleteEntry (Context *ctx)
void | OnUnhandledKey (Context *ctx, const KeyEvent &key)

## Constructor & Destructor Documentation

## ◆ TableTranslator()

rime::TableTranslator::TableTranslator | ( | const Ticket & | ticket | ) |

## Member Function Documentation

## ◆ encoder()

UnityTableEncoder * rime::TableTranslator::encoder | ( |  | ) | const
| inline

## ◆ GetPrecedingText()

string rime::TableTranslator::GetPrecedingText | ( | size_t | start | ) | const

## ◆ MakeSentence()

an< Translation > rime::TableTranslator::MakeSentence | ( | const string & | input,
|  | size_t | start,
|  | bool | include_prefix_phrases = false )

## ◆ Memorize()

bool rime::TableTranslator::Memorize | ( | const CommitEntry & | commit_entry | ) |
| virtual

Implements rime::Memory.

## ◆ Query()

an< Translation > rime::TableTranslator::Query | ( | const string & | input,
|  | const Segment & | segment )
| virtual

Implements rime::Translator.

## Member Data Documentation

## ◆ enable_charset_filter_

bool rime::TableTranslator::enable_charset_filter_ = false
| protected

## ◆ enable_encoder_

bool rime::TableTranslator::enable_encoder_ = false
| protected

## ◆ enable_sentence_

bool rime::TableTranslator::enable_sentence_ = true
| protected

## ◆ encode_commit_history_

bool rime::TableTranslator::encode_commit_history_ = true
| protected

## ◆ encoder_

the<UnityTableEncoder> rime::TableTranslator::encoder_
| protected

## ◆ max_homographs_

int rime::TableTranslator::max_homographs_ = 1
| protected

## ◆ max_phrase_length_

int rime::TableTranslator::max_phrase_length_ = 5
| protected

## ◆ poet_

the<Poet> rime::TableTranslator::poet_
| protected

## ◆ sentence_over_completion_

bool rime::TableTranslator::sentence_over_completion_ = false
| protected

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

- table_translator.h
- table_translator.cc