1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Test that the stems are of length p.

This commit is contained in:
Rob Rix 2016-06-22 13:46:06 -04:00
parent 4d2af0684d
commit f2c5dd3d8c

View File

@ -22,7 +22,7 @@ spec = parallel $ do
Fixed c -> c
Keyed c -> toList c in
prop "produces grams with stems of the specified length" $ forAll (arbitrary `suchThat` ((> 0) . fst . snd)) $
\ (term, (p, q)) -> pqGrams p q (headF &&& getChildren) (toTerm term :: Term String String) `shouldSatisfy` all ((<= p) . length . stem)
\ (term, (p, q)) -> pqGrams p q (headF &&& getChildren) (toTerm term :: Term String String) `shouldSatisfy` all ((== p) . length . stem)
describe "featureVector" $ do
prop "produces a vector of the specified dimension" $ forAll (arbitrary `suchThat` ((> 0) . snd)) $