librime: rime::Sentence Class Reference

| librime 1.2 Rime Input Method Engine, the core library

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

`#include <translator_commons.h>`

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

## Public Member Functions
| Sentence (const Language *language)
| Sentence (const Sentence &other)
void | Extend (const DictEntry &another, size_t end_pos, double new_weight)
void | Offset (size_t offset)
bool | empty () const
size_t | size () const
const vector< DictEntry > & | components () const
const vector< size_t > & | word_lengths () const
Public Member Functions inherited from rime::Phrase
| 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
vector< DictEntry > | components_
vector< size_t > | word_lengths_
Protected Attributes inherited from rime::Phrase
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

## ◆ Sentence() [1/2]

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

## ◆ Sentence() [2/2]

rime::Sentence::Sentence | ( | const Sentence & | other | ) |
| inline

## Member Function Documentation

## ◆ components()

const vector< DictEntry > & rime::Sentence::components | ( |  | ) | const
| inline

## ◆ empty()

bool rime::Sentence::empty | ( |  | ) | const
| inline

## ◆ Extend()

void rime::Sentence::Extend | ( | const DictEntry & | another,
|  | size_t | end_pos,
|  | double | new_weight )

## ◆ Offset()

void rime::Sentence::Offset | ( | size_t | offset | ) |

## ◆ size()

size_t rime::Sentence::size | ( |  | ) | const
| inline

## ◆ word_lengths()

const vector< size_t > & rime::Sentence::word_lengths | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ components_

vector<DictEntry> rime::Sentence::components_
| protected

## ◆ word_lengths_

vector<size_t> rime::Sentence::word_lengths_
| protected

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

- translator_commons.h
- translator_commons.cc