We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79be265 commit 52af2e9Copy full SHA for 52af2e9
src/finalfusion/subword/hash_indexers.pyx
@@ -137,7 +137,7 @@ cdef class FinalfusionHashIndexer:
137
if j + i <= length:
138
h = (fifu_hash_ngram(word, i, j) & self.mask) + offset
139
if with_ngrams:
140
- ngrams.append((h, word[i:i + j]))
+ ngrams.append((word[i:i + j], h))
141
else:
142
ngrams.append(h)
143
return ngrams
@@ -269,7 +269,7 @@ cdef class FastTextIndexer:
269
end = offsets.data.as_uints[i + j]
270
h = ft_hash_ngram(b_word_ptr, start, end) % self._n_buckets + offset
271
272
273
274
275
0 commit comments