mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Limit the p,q-gram test to p > 0 & q > 0.
This commit is contained in:
parent
7ff1fb0021
commit
ad380bf08d
@ -21,8 +21,8 @@ spec = parallel $ do
|
||||
Indexed c -> c
|
||||
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)
|
||||
prop "produces grams with stems of the specified length" $ forAll (arbitrary `suchThat` (\ (_, p, q) -> p > 0 && q > 0)) $
|
||||
\ (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)) $
|
||||
|
Loading…
Reference in New Issue
Block a user