mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Don’t bind the after list’s index.
This commit is contained in:
parent
457082ba6f
commit
d56f2176b9
@ -32,7 +32,7 @@ rws compare getLabel as bs
|
|||||||
fbs = featurize bs
|
fbs = featurize bs
|
||||||
kdas = KdTree.build (Vector.toList . fst . fst) fas
|
kdas = KdTree.build (Vector.toList . fst . fst) fas
|
||||||
featurize a = zip ((featureVector d . pqGrams p q getLabel &&& identity) <$> a) ([0..] :: [Integer])
|
featurize a = zip ((featureVector d . pqGrams p q getLabel &&& identity) <$> a) ([0..] :: [Integer])
|
||||||
findNearestNeighbourTo kv@((_, v), i) = do
|
findNearestNeighbourTo kv@((_, v), _) = do
|
||||||
mapped <- get
|
mapped <- get
|
||||||
let ((k, nearest), j) = KdTree.nearest kdas kv
|
let ((k, nearest), j) = KdTree.nearest kdas kv
|
||||||
if k `Set.member` mapped
|
if k `Set.member` mapped
|
||||||
|
Loading…
Reference in New Issue
Block a user