From 0cd9fa9e340d410123732b40fd51bce9cf0244e2 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 9 Aug 2016 11:10:04 -0400 Subject: [PATCH] Correct the :memo: for decorateTermWithPQGram. --- src/Data/RandomWalkSimilarity.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/RandomWalkSimilarity.hs b/src/Data/RandomWalkSimilarity.hs index dc06cdfde..ec7dbb586 100644 --- a/src/Data/RandomWalkSimilarity.hs +++ b/src/Data/RandomWalkSimilarity.hs @@ -82,7 +82,7 @@ decorateTermWithPGram p = ana coalgebra . (,) [] coalgebra (parentLabels, c) = case extract c of RCons label rest -> (Gram (padToSize p parentLabels) (pure (Just label)) .: rest) :< fmap ((,) (padToSize p (Just label : parentLabels))) (unwrap c) --- | Replaces labels in a term’s annotations with corresponding bags of p,q-grams. +-- | Replaces labels in a term’s annotations with corresponding p,q-grams. decorateTermWithPQGram :: Traversable f => Int -> Int -> Cofree f (Record (label ': fields)) -> Cofree f (Record (Gram label ': fields)) decorateTermWithPQGram p q = cata algebra . decorateTermWithPGram p where algebra :: Traversable f => CofreeF f (Record (Gram label ': fields)) (Cofree f (Record (Gram label ': fields))) -> Cofree f (Record (Gram label ': fields))