|
libime
|
Class that holds updated Pinyin correction mapping based on correction mapping. More...
#include <libime/pinyin/pinyincorrectionprofile.h>
Public Member Functions | |
| PinyinCorrectionProfile (BuiltinPinyinCorrectionProfile profile) | |
| Construct the profile based on builtin layout. More... | |
| PinyinCorrectionProfile (const std::unordered_map< char, std::vector< char >> &mapping) | |
| Construct the profile based on customized mapping. More... | |
| const PinyinMap & | pinyinMap () const |
| Return the updated pinyin map. More... | |
| const std::unordered_map< char, std::vector< char > > & | correctionMap () const |
| Return the correction mapping. More... | |
Class that holds updated Pinyin correction mapping based on correction mapping.
Definition at line 37 of file pinyincorrectionprofile.h.
|
explicit |
Construct the profile based on builtin layout.
| profile | built-in profile |
Definition at line 60 of file pinyincorrectionprofile.cpp.
|
explicit |
Construct the profile based on customized mapping.
E.g. w may be corrected to q,e, the mapping will contain {'w': ['q', 'e']}.
| mapping | pinyin character and the corresponding possible wrong key. |
Definition at line 64 of file pinyincorrectionprofile.cpp.
| const std::unordered_map< char, std::vector< char > > & libime::PinyinCorrectionProfile::correctionMap | ( | ) | const |
Return the correction mapping.
E.g. w may be corrected to q,e, the mapping will contain {'w': ['q', 'e']}.
Definition at line 106 of file pinyincorrectionprofile.cpp.
| const PinyinMap & libime::PinyinCorrectionProfile::pinyinMap | ( | ) | const |
Return the updated pinyin map.
New entries will be marked with PinyinFuzzyFlag::Correction
Definition at line 100 of file pinyincorrectionprofile.cpp.
1.8.13