mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Fix two bugs in dicttool"
This commit is contained in:
commit
3722f0877e
@ -647,7 +647,7 @@ public final class FusionDictionary implements Iterable<Word> {
|
|||||||
|
|
||||||
if (index < codePoints.length) return null;
|
if (index < codePoints.length) return null;
|
||||||
if (!currentGroup.isTerminal()) return null;
|
if (!currentGroup.isTerminal()) return null;
|
||||||
if (DBG && !codePoints.equals(checker.toString())) return null;
|
if (DBG && !string.equals(checker.toString())) return null;
|
||||||
return currentGroup;
|
return currentGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,16 +853,19 @@ public final class FusionDictionary implements Iterable<Word> {
|
|||||||
if (currentPos.pos.hasNext()) {
|
if (currentPos.pos.hasNext()) {
|
||||||
final CharGroup currentGroup = currentPos.pos.next();
|
final CharGroup currentGroup = currentPos.pos.next();
|
||||||
currentPos.length = mCurrentString.length();
|
currentPos.length = mCurrentString.length();
|
||||||
for (int i : currentGroup.mChars)
|
for (int i : currentGroup.mChars) {
|
||||||
mCurrentString.append(Character.toChars(i));
|
mCurrentString.append(Character.toChars(i));
|
||||||
|
}
|
||||||
if (null != currentGroup.mChildren) {
|
if (null != currentGroup.mChildren) {
|
||||||
currentPos = new Position(currentGroup.mChildren.mData);
|
currentPos = new Position(currentGroup.mChildren.mData);
|
||||||
|
currentPos.length = mCurrentString.length();
|
||||||
mPositions.addLast(currentPos);
|
mPositions.addLast(currentPos);
|
||||||
}
|
}
|
||||||
if (currentGroup.mFrequency >= 0)
|
if (currentGroup.mFrequency >= 0) {
|
||||||
return new Word(mCurrentString.toString(), currentGroup.mFrequency,
|
return new Word(mCurrentString.toString(), currentGroup.mFrequency,
|
||||||
currentGroup.mShortcutTargets, currentGroup.mBigrams,
|
currentGroup.mShortcutTargets, currentGroup.mBigrams,
|
||||||
currentGroup.mIsNotAWord, currentGroup.mIsBlacklistEntry);
|
currentGroup.mIsNotAWord, currentGroup.mIsBlacklistEntry);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mPositions.removeLast();
|
mPositions.removeLast();
|
||||||
currentPos = mPositions.getLast();
|
currentPos = mPositions.getLast();
|
||||||
|
Loading…
Reference in New Issue
Block a user