From d102c6a13a700b6211cf6f78e670a74041930af4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 8 Feb 2017 11:54:14 -0500 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20re-erase=20vectors.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Data/RandomWalkSimilarity.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/RandomWalkSimilarity.hs b/src/Data/RandomWalkSimilarity.hs index b2f1e6e49..dcde8cdb9 100644 --- a/src/Data/RandomWalkSimilarity.hs +++ b/src/Data/RandomWalkSimilarity.hs @@ -121,7 +121,7 @@ rws compare as bs (These Int Int, Diff f (Record fields)) insertion previous unmappedA unmappedB (UnmappedTerm j _ b) = do put (previous, unmappedA, IntMap.delete j unmappedB) - pure (That j, inserting ((`setFeatureVector` Nothing) <$> b)) + pure (That j, inserting b) -- | Finds the most-similar unmapped term to the passed-in term, if any. -- @@ -144,7 +144,7 @@ rws compare as bs deleteRemaining diffs (_, unmappedA, _) = foldl' (\into (i, deletion) -> insertDiff (This i, deletion) into) diffs - ((termIndex &&& deleting . fmap (`setFeatureVector` Nothing) . term) <$> unmappedA) + ((termIndex &&& deleting . term) <$> unmappedA) -- Possibly replace terms in a diff. replaceIfEqual :: Term f (Record fields) -> Term f (Record fields) -> Maybe (Diff f (Record fields))