双拼声母韵母匹配失效问题,Keyboard切分函数的问题 #6
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
如标题所述
1.双拼声母韵母匹配失效问题
双拼匹配要求声母韵母同时存在,但是存在失效问题
双拼声母韵母匹配失效问题来源于没有检查strCmp返回的是否为0
有时候start如果等于了source.length()就会导致双拼要求的声母韵母同时存在的规则失效
要检查strCmp返回的是否为0,如果为0,那么代表没有匹配成功的字符串
2.Keyboard切分函数的问题
之前添加的Keyboard的一些新键位设计,没有去考虑到其对应的零声母规则,我已经实现了他们对应的零声母规则:
zeroOInitial: 如果没有声母,则用o作为声母 (搜狗,微软,紫光)
zeroAInitial: 如果没有声母,则用a作为声母 (国标)
zeroFirstInitial: 如果没有声母,则是韵母第一个字母作为声母 (拼音加加)
额外:原本智能ABC双拼打了表但是忘记填写字段了,现在加上了