1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Remove the fallback to termVector, as it’s redundant.

This commit is contained in:
Rob Rix 2017-02-08 12:18:17 -05:00
parent d9e44ede6c
commit 7aed25cccd

View File

@ -250,7 +250,6 @@ featureVectorDecorator getLabel p q d
where collect ((gram :. rest) :< functor) = cofree ((foldl' addSubtermVector (Just (unitVector d (hash gram))) functor :. rest) :< functor)
addSubtermVector :: Functor f => Maybe FeatureVector -> Term f (Record (Maybe FeatureVector ': fields)) -> Maybe FeatureVector
addSubtermVector v term = addVectors <$> v <*> termVector
<|> termVector
where termVector = rhead (extract term)
addVectors :: Num a => Array Int a -> Array Int a -> Array Int a