|
libime
|
A simple MRU based dictionary. More...
#include <libime/table/autophrasedict.h>
Public Member Functions | |
| AutoPhraseDict (size_t maxItems) | |
| AutoPhraseDict (size_t maxItems, std::istream &in) | |
| void | insert (const std::string &entry, uint32_t value=0) |
| Insert a word into dictionary and refresh the MRU. More... | |
| bool | search (std::string_view s, const std::function< bool(std::string_view, uint32_t)> &callback) const |
| Check if any word starting with s exists in the dictionary. | |
| uint32_t | exactSearch (std::string_view s) const |
| Returns 0 if there is no such word. | |
| void | erase (std::string_view s) |
| void | clear () |
| void | load (std::istream &in) |
| void | save (std::ostream &out) |
| bool | empty () const |
A simple MRU based dictionary.
Definition at line 24 of file autophrasedict.h.
| void libime::AutoPhraseDict::insert | ( | const std::string & | entry, |
| uint32_t | value = 0 |
||
| ) |
Insert a word into dictionary and refresh the MRU.
Set the value of entry to value if value is positive. Otherwise if the value is 0, the actual value will be increased the value by 1.
Definition at line 66 of file autophrasedict.cpp.
1.8.13