PinyinDictionary is a set of dictionaries for Pinyin.
More...
#include <libime/pinyin/pinyindictionary.h>
|
|
using | dictionaryChanged = TrieDictionary::dictionaryChanged |
| |
|
using | TrieType = DATrie< float > |
| |
|
|
void | load (size_t idx, std::istream &in, PinyinDictFormat format) |
| |
|
void | load (size_t idx, const char *filename, PinyinDictFormat format) |
| |
|
void | matchWords (const char *data, size_t size, PinyinMatchCallback callback) const |
| |
|
void | matchWordsPrefix (const char *data, size_t size, PinyinMatchCallback callback) const |
| |
|
void | save (size_t idx, const char *filename, PinyinDictFormat format) |
| |
|
void | save (size_t idx, std::ostream &out, PinyinDictFormat format) |
| |
|
void | addWord (size_t idx, std::string_view fullPinyin, std::string_view hanzi, float cost=0.0F) |
| |
|
bool | removeWord (size_t idx, std::string_view fullPinyin, std::string_view hanzi) |
| |
|
std::optional< float > | lookupWord (size_t idx, std::string_view fullPinyin, std::string_view hanzi) const |
| |
|
void | setFlags (size_t idx, PinyinDictFlags flags) |
| |
|
void | addEmptyDict () |
| |
|
void | removeAll () |
| |
| void | removeFrom (size_t idx) |
| | Remove all dictionary from given index. More...
|
| |
|
void | clear (size_t idx) |
| |
|
const TrieType * | trie (size_t idx) const |
| |
| void | setTrie (size_t idx, TrieType trie) |
| | Set trie from external source. More...
|
| |
|
size_t | dictSize () const |
| |
|
| FCITX_DECLARE_SIGNAL (TrieDictionary, dictionaryChanged, void(size_t)) |
| |
|
| FCITX_DECLARE_SIGNAL (TrieDictionary, dictSizeChanged, void(size_t)) |
| |
|
void | matchPrefix (const SegmentGraph &graph, const GraphMatchCallback &callback, const std::unordered_set< const SegmentGraphNode *> &ignore={}, void *helper=nullptr) const |
| |
|
| static TrieType | load (std::istream &in, PinyinDictFormat format) |
| | Load text format into the Trie. More...
|
| |
|
|
void | matchPrefixImpl (const SegmentGraph &graph, const GraphMatchCallback &callback, const std::unordered_set< const SegmentGraphNode *> &ignore, void *helper) const override |
| |
|
TrieType * | mutableTrie (size_t idx) |
| |
|
void | addWord (size_t idx, std::string_view key, float cost=0.0F) |
| |
|
bool | removeWord (size_t idx, std::string_view key) |
| |
|
| FCITX_DECLARE_PRIVATE (TrieDictionary) |
| |
|
|
static const size_t | SystemDict = 0 |
| |
|
static const size_t | UserDict = 1 |
| |
|
std::unique_ptr< TrieDictionaryPrivate > | d_ptr |
| |
PinyinDictionary is a set of dictionaries for Pinyin.
Definition at line 56 of file pinyindictionary.h.
◆ load()
The documentation for this class was generated from the following files: