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:
parent
6ab3e09c25
commit
0cd9fa9e34
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user