librime: rime::Poet Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Types | Public Member Functions | Static Public Member Functions | List of all members
rime::Poet Class Reference

`#include <poet.h>`

## Public Types
using | Compare = function<bool(const Line&, const Line&)>

## Public Member Functions
| Poet (const Language *language, Config *config, Compare compare=CompareWeight)
| ~Poet ()
an< Sentence > | MakeSentence (const WordGraph &graph, size_t total_length, const string &preceding_text)
deque< an< Sentence > > | MakeSentences (const WordGraph &graph, size_t total_length, const string &preceding_text, size_t count, double cutoff_threshold)
template<class TranslatorT>
an< Translation > | ContextualWeighted (an< Translation > translation, const string &input, size_t start, TranslatorT *translator)

## Static Public Member Functions
static bool | CompareWeight (const Line &one, const Line &other)
static bool | LeftAssociateCompare (const Line &one, const Line &other)

## Member Typedef Documentation

## ◆ Compare

using rime::Poet::Compare = function<bool(const Line&, const Line&)>

## Constructor & Destructor Documentation

## ◆ Poet()

rime::Poet::Poet | ( | const Language * | language,
|  | Config * | config,
|  | Compare | compare = CompareWeight )

## ◆ ~Poet()

rime::Poet::~Poet | ( |  | ) |

## Member Function Documentation

## ◆ CompareWeight()

bool rime::Poet::CompareWeight | ( | const Line & | one,
|  | const Line & | other )
| static

## ◆ ContextualWeighted()

template<class TranslatorT>

an< Translation > rime::Poet::ContextualWeighted | ( | an< Translation > | translation,
|  | const string & | input,
|  | size_t | start,
|  | TranslatorT * | translator )
| inline

## ◆ LeftAssociateCompare()

bool rime::Poet::LeftAssociateCompare | ( | const Line & | one,
|  | const Line & | other )
| static

## ◆ MakeSentence()

an< Sentence > rime::Poet::MakeSentence | ( | const WordGraph & | graph,
|  | size_t | total_length,
|  | const string & | preceding_text )

## ◆ MakeSentences()

deque< an< Sentence > > rime::Poet::MakeSentences | ( | const WordGraph & | graph,
|  | size_t | total_length,
|  | const string & | preceding_text,
|  | size_t | count,
|  | double | cutoff_threshold )

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

- poet.h
- poet.cc