mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
(ngram) Fix index range in NgramLexicon to an avoid exception
This commit is contained in:
parent
55f627ed4c
commit
a0d9e66ff7
@ -80,7 +80,7 @@ public class NgramLexicon {
|
|||||||
int ct = counts.get(ordered);
|
int ct = counts.get(ordered);
|
||||||
|
|
||||||
if (ct > 0) {
|
if (ct > 0) {
|
||||||
positions.add(Arrays.copyOfRange(parts, i - length, length));
|
positions.add(Arrays.copyOfRange(parts, i - length, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i >= hashes.length)
|
if (i >= hashes.length)
|
||||||
|
Loading…
Reference in New Issue
Block a user