手册
1. DWIMECore
1.1  SDK使用流程图
1.2  getEngineVersion
1.3. 数据加载
1.3.1  dataAdd
1.3.2  dataMap
1.3.3  dataFile
1.3.4  dataClear
1.3.5  dataExist
1.3.6  数据ID定义
1.4. 键盘模块
1.4.1  init
1.4.2  deinit
1.4.3  reset
1.4.4  setPYFuzzy
1.4.5  setOption
1.4.6  customPYFuzzy
1.4.7  setCorrect
1.4.8  addCorrect
1.4.9. 输入
1.4.9.1  processKey
1.4.9.2  processKeys
1.4.9.3  associateKey
1.4.9.4  setCandSelect
1.4.9.5  setSyllableSelect
1.4.10. 输出
1.4.10.1  getCandCount
1.4.10.2  getSyllableCount
1.4.10.3  getInputString
1.4.10.4  getCompString
1.4.10.5  getCompCorrectCount
1.4.10.6  getCompCorrectInfo
1.4.10.7  getFormatPinyin
1.4.10.8  getCandString
1.4.10.9  getSyllableString
1.4.10.10  getSyllableSelectedInfo
1.4.10.11  getCommitString
1.4.10.12  getCandCode
1.4.10.13  getCandAttr
1.4.11. 查询
1.4.11.1  getLanguage
1.4.11.2  getInputMode
1.4.11.3  getKBType
1.4.11.4  isCanCommit
1.4.11.5  isAssociateMode
1.5. 手写模块
1.5.1  hwInit
1.5.2  hwDeinit
1.5.3  hwReset
1.5.4  hwSetOption
1.5.5  hwRecognize
1.5.6  功能设置项定义
1.5.7  手写识别模式定义
1.6. 记忆模块
1.6.1  userDBCopy
1.6.2  userDBFree
1.6.3  userDBGetPhr
1.6.4  userDBGetCode
1.6.5  userDBGetCount
1.6.6  userDBDelPhr
1.6.7  userDBDelPhr2
1.6.8  userDBIsNewPhr
1.6.9  userDBItemExisted
1.6.10  userDBAdd
1.6.11  userDBAdd2
1.6.12  userDBGetAttr
1.6.13  userDBImportContacts
1.7. 授权模块
1.7.1  appBinding (C/C++)
1.7.2  appBinding (Android)
1.7.3  appBinding (iOS)
1.7.4  getLicense
1.8. 宏定义
1.8.1  语言定义
1.8.2  键盘类型定义
1.8.3  输入模式定义
1.8.4  按键定义
1.8.5  按键动作定义
1.8.6  模糊音定义
1.8.7  错误码定义
1.8.8  记忆数据类型dbType定义
1.8.9  输入法功能开关定义
1.9. 具体问题与例子
1.9.1  什么是细胞词库?
1.9.2  如何使用细胞词库功能?
1.9.3  如何开启表情跟随功能?
1.9.4  如何关闭/开启纠错功能?
1.9.5  如何实现流行热词更新?
1.9.6  如何使用标点跟随功能?
1.9.7  如何使用云拼音功能?
1.9.8  如何使用模糊音功能?
1.9.9  联想功能开关?
1.9.10  开启/关闭中英混合功能
1.9.11  五笔模式开启拼音功能
1.9.12  五笔模式打开编码提示
1.9.13  手写识别各种模式切换

customPYFuzzy

1359
文子
2022-02-16 12:06:55
int  customPYFuzzy( const unsigned short * fuzzyFirst[], const unsigned short * fuzzySecond[], int count );

加入count个自定义的模糊音。目前只支持声母。

注意:必须在Init前调用才能生效。

参数:

  1. fuzzyFirst - 模糊音声母1
  2. fuzzySecond -  模糊音声母2
  3. count 数量,最多5个。

返回:

返回0表示成功。

// 如需要设置 j <=> zh:


// 第一步:添加1个自定义模糊音
const unsigned short * fuzzyFirst[] = { u"j" };
const unsigned short * fuzzySecond[] = { u"zh" };
customPYFuzzy(fuzzyFirst, fuzzySecond, 1);


// 第二步:启用模糊音

setPYFuzzy( DWIME_FUZZY_C_CH
                  DWIME_FUZZY_S_SH
                  DWIME_FUZZY_Z_ZH |      
                  DWIME_FUZZY_CUSTOM1);    // 这里就是启用 j <=> zh 的模糊音


// PS: 如果添加了多个自定义模糊音,

// 就按顺序使用: DWIME_FUZZY_CUSTOM1、 DWIME_FUZZY_CUSTOM3、 DWIME_FUZZY_CUSTOM3 ....最多能设置5个。