librime: rime::Phrase Class Reference

| librime 1.2 Rime Input Method Engine, the core library

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

`#include <translator_commons.h>`

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

## Public Member Functions
| Phrase (const Language *language, const string &type, size_t start, size_t end, const an< DictEntry > &entry)
const string & | text () const
string | comment () const
string | preedit () const
void | set_comment (const string &comment)
void | set_preedit (const string &preedit)
void | set_syllabifier (an< PhraseSyllabifier > syllabifier)
double | weight () const
void | set_weight (double weight)
Code & | code () const
const DictEntry & | entry () const
const Language * | language () const
size_t | matching_code_size () const
bool | is_exact_match () const
bool | is_predicitve_match () const
Code | matching_code () const
Spans | spans ()
Public Member Functions inherited from rime::Candidate
| Candidate ()=default
| Candidate (const string &type, size_t start, size_t end, double quality=0.)
virtual | ~Candidate ()=default
int | compare (const Candidate &other)
const string & | type () const
size_t | start () const
size_t | end () const
double | quality () const
void | set_type (const string &type)
void | set_start (size_t start)
void | set_end (size_t end)
void | set_quality (double quality)

## Protected Attributes
const Language * | language_
an< DictEntry > | entry_
an< PhraseSyllabifier > | syllabifier_

## Additional Inherited Members
Static Public Member Functions inherited from rime::Candidate
static an< Candidate > | GetGenuineCandidate (const an< Candidate > &cand)
static vector< of< Candidate > > | GetGenuineCandidates (const an< Candidate > &cand)

## Constructor & Destructor Documentation

## ◆ Phrase()

rime::Phrase::Phrase | ( | const Language * | language,
|  | const string & | type,
|  | size_t | start,
|  | size_t | end,
|  | const an< DictEntry > & | entry )
| inline

## Member Function Documentation

## ◆ code()

Code & rime::Phrase::code | ( |  | ) | const
| inline

## ◆ comment()

string rime::Phrase::comment | ( |  | ) | const
| inlinevirtual

Reimplemented from rime::Candidate.

## ◆ entry()

const DictEntry & rime::Phrase::entry | ( |  | ) | const
| inline

## ◆ is_exact_match()

bool rime::Phrase::is_exact_match | ( |  | ) | const
| inline

## ◆ is_predicitve_match()

bool rime::Phrase::is_predicitve_match | ( |  | ) | const
| inline

## ◆ language()

const Language * rime::Phrase::language | ( |  | ) | const
| inline

## ◆ matching_code()

Code rime::Phrase::matching_code | ( |  | ) | const
| inline

## ◆ matching_code_size()

size_t rime::Phrase::matching_code_size | ( |  | ) | const
| inline

## ◆ preedit()

string rime::Phrase::preedit | ( |  | ) | const
| inlinevirtual

Reimplemented from rime::Candidate.

## ◆ set_comment()

void rime::Phrase::set_comment | ( | const string & | comment | ) |
| inline

## ◆ set_preedit()

void rime::Phrase::set_preedit | ( | const string & | preedit | ) |
| inline

## ◆ set_syllabifier()

void rime::Phrase::set_syllabifier | ( | an< PhraseSyllabifier > | syllabifier | ) |
| inline

## ◆ set_weight()

void rime::Phrase::set_weight | ( | double | weight | ) |
| inline

## ◆ spans()

Spans rime::Phrase::spans | ( |  | ) |
| inline

## ◆ text()

const string & rime::Phrase::text | ( |  | ) | const
| inlinevirtual

Implements rime::Candidate.

## ◆ weight()

double rime::Phrase::weight | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ entry_

an<DictEntry> rime::Phrase::entry_
| protected

## ◆ language_

const Language* rime::Phrase::language_
| protected

## ◆ syllabifier_

an<PhraseSyllabifier> rime::Phrase::syllabifier_
| protected

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

- translator_commons.h