1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Correct the 📝 for decorateTermWithPQGram.

This commit is contained in:
Rob Rix 2016-08-09 11:10:04 -04:00
parent 6ab3e09c25
commit 0cd9fa9e34

View File

@ -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 terms annotations with corresponding bags of p,q-grams.
-- | Replaces labels in a terms 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))