|
libime
|
This is a prediction class that allows to predict against both model and pinyin dictionary. More...
#include <libime/pinyin/pinyinprediction.h>


Public Member Functions | |
| void | setPinyinDictionary (const PinyinDictionary *dict) |
| Set the pinyin dictionary used for prediction. | |
| std::vector< std::pair< std::string, PinyinPredictionSource > > | predict (const State &state, const std::vector< std::string > &sentence, std::string_view lastEncodedPinyin, size_t maxSize=0) |
| Predict from model and pinyin dictionary for the last sentnce being type. | |
| std::vector< std::pair< std::string, PinyinPredictionSource > > | predict (const State &state, const std::vector< libime::HistoryBigram::WordWithCode > &sentence, size_t maxSize=0) |
| Predict from model and pinyin dictionary for the last sentnce being type. More... | |
| std::vector< std::string > | predict (const std::vector< std::string > &sentence={}, size_t maxSize=0) |
| Same as the Prediction::predict with the same signature. | |
Public Member Functions inherited from libime::Prediction | |
| void | setUserLanguageModel (const UserLanguageModel *lm) |
| void | setLanguageModel (const LanguageModel *model) |
| const LanguageModel * | model () const |
| void | setHistoryBigram (const HistoryBigram *bigram) |
| const HistoryBigram * | historyBigram () const |
| std::vector< std::string > | predict (const State &state, const std::vector< std::string > &sentence={}, size_t maxSize=0) |
| std::vector< std::string > | predict (const std::vector< std::string > &sentence={}, size_t maxSize=0) |
| std::vector< std::pair< std::string, float > > | predictWithScore (const State &state, const std::vector< std::string > &sentence, size_t maxSize) |
This is a prediction class that allows to predict against both model and pinyin dictionary.
Definition at line 32 of file pinyinprediction.h.
| std::vector< std::pair< std::string, PinyinPredictionSource > > libime::PinyinPrediction::predict | ( | const State & | state, |
| const std::vector< libime::HistoryBigram::WordWithCode > & | sentence, | ||
| size_t | maxSize = 0 |
||
| ) |
Predict from model and pinyin dictionary for the last sentnce being type.
Definition at line 144 of file pinyinprediction.cpp.
1.8.13