4 module Tests
.Unit
.TestStopWords
where
8 import Data
.SpiderNet
.Bayes
11 stopWordsDb
= "../../var/lib/spiderdb/lexicon/stopwords/stopwords.tdb"
13 foo
:: Int -> (Int, Int)
17 stopwords
<- readStopWords stopWordsDb
18 let datatest
= [ "the", "school", "is", "over", "there", "canada", "chicken" ]
19 rmwords
= datatest
\\ stopwords
20 putStrLn $ show rmwords
21 putStrLn $ "Stop Word Density=" ++
22 show (stopWordDensity
"the school is over there canada chicken dogs" stopwords
)
25 test1
= TestCase
(assertEqual
"for (foo 3)," (1,2) (foo
3))
28 allTests
= TestList
[ TestLabel
"stop words" test1
]