Skip to content

Commit

Permalink
Fix #191
Browse files Browse the repository at this point in the history
  • Loading branch information
bab2min committed Oct 12, 2024
1 parent 90e61e0 commit 40e5a22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/KTrie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ size_t kiwi::splitByTrie(
const auto scanStart = max(endPosMap[nBeginWithMultiplier].first, (uint32_t)1), scanEnd = endPosMap[nBeginWithMultiplier].second;
const bool longestMatched = scanStart < scanEnd && any_of(out.begin() + scanStart, out.begin() + scanEnd, [&](const KGraphNode& g)
{
return nBeginWithMultiplier == g.endPos && lastSpecialEndPos == g.endPos - (g.uform.empty() ? g.form->sizeWithoutSpace() : g.uform.size()) * posMultiplier;
const auto start = g.endPos - (g.uform.empty() ? g.form->sizeWithoutSpace() : g.uform.size()) * posMultiplier;
return nBeginWithMultiplier == g.endPos && (lastSpecialEndPos == start || specialStartPos == start);
});

// insert unknown form
Expand Down

0 comments on commit 40e5a22

Please sign in to comment.