mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Revert "Place the index last."
This reverts commit a7ff749b2d0fb5991b8b20c97cd1855105d48b49.
This commit is contained in:
parent
b49997d83e
commit
223d549397
@ -36,11 +36,11 @@ rws compare getLabel as bs
|
|||||||
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
|
||||||
then pure (insert v, j)
|
then pure (j, insert v)
|
||||||
else do
|
else do
|
||||||
put (Set.insert k mapped)
|
put (Set.insert k mapped)
|
||||||
pure $! maybe (replace nearest v, j) (flip (,) j) (compare nearest v)
|
pure $! maybe (j, replace nearest v) ((,) j) (compare nearest v)
|
||||||
deleteRemaining diff mapped = fmap fst diff <> (delete . snd . fst <$> filter (not . (`Set.member` mapped) . fst . fst) fas)
|
deleteRemaining diff mapped = fmap snd diff <> (delete . snd . fst <$> filter (not . (`Set.member` mapped) . fst . fst) fas)
|
||||||
|
|
||||||
data Gram label = Gram { stem :: [Maybe label], base :: [Maybe label] }
|
data Gram label = Gram { stem :: [Maybe label], base :: [Maybe label] }
|
||||||
deriving (Eq, Show)
|
deriving (Eq, Show)
|
||||||
|
Loading…
Reference in New Issue
Block a user