mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Change the prune condition
Change-Id: I92aef12e0e1d89cfe1b346ddc6ef4df158ffe0b3
This commit is contained in:
parent
8289dede0a
commit
f071e75b78
@ -808,7 +808,8 @@ inline bool UnigramDictionary::processCurrentNode(const int initialPos, const in
|
||||
}
|
||||
}
|
||||
// Optimization: Prune out words that are too long compared to how much was typed.
|
||||
if (correctionState->getOutputIndex() >= maxDepth || diffs > mMaxEditDistance) {
|
||||
if (isTerminal
|
||||
&& (correctionState->getOutputIndex() >= maxDepth || diffs > mMaxEditDistance)) {
|
||||
// We are giving up parsing this node and its children. Skip the rest of the node,
|
||||
// output the sibling position, and return that we don't want to traverse children.
|
||||
if (!isLastChar) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user