mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Pull the feature vector setter out.
This commit is contained in:
parent
b72e5fa730
commit
3814fb6968
@ -170,7 +170,10 @@ rws compare as bs
|
||||
|
||||
eraseFeatureVector :: Term f (Record fields) -> Term f (Record fields)
|
||||
eraseFeatureVector term = let record :< functor = runCofree term in
|
||||
cofree (setField record (Nothing :: Maybe FeatureVector) :< functor)
|
||||
cofree (setFeatureVector record Nothing :< functor)
|
||||
|
||||
setFeatureVector :: Record fields -> Maybe FeatureVector -> Record fields
|
||||
setFeatureVector = setField
|
||||
|
||||
toMap = IntMap.fromList . fmap (termIndex &&& identity)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user