Skip to content

Commit d9edb54

Browse files
Add comment
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
1 parent d5bc7e0 commit d9edb54

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

nlpcore/src/latin/prediction.cppm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ void fuzzySearchRecursive(
361361
// TODO: improve prefix searching performance (run time and stop detection)
362362
// Eligible as prefix candidate? searching for prefix, current word and query word same until `token_index`, and cost at word size within bound.
363363
// [Bug?] editDistanceAt at this stage is either 0 or leftover from last time we searched till word.size().
364+
// If bug, this can be replaced with .editDistanceAt(token_index) + cost_insert_ * (word.size() - token_index)
364365
auto isWordPrefix = params.search_type_ == LatinFuzzySearchType::ProximityOrPrefix &&
365366
state.isPrefixAt(token_index) &&
366367
(prefixCost = state.editDistanceAt(word.size())) <= state.weights_.max_cost_sum_;

0 commit comments

Comments
 (0)