adding all of botlist, initial add
[botlist.git] / botlistprojects / botspider / spider / tests / haskell / src / Tests / Unit / TestStopWords.hs
bloba45622a2ebb041a5cbe6c2e7e3f14ada3f32f467
1 --
2 -- Test Stop Words
4 module Tests.Unit.TestStopWords where
6 import Test.HUnit
8 import Data.SpiderNet.Bayes
9 import Data.List
11 stopWordsDb = "../../var/lib/spiderdb/lexicon/stopwords/stopwords.tdb"
13 foo :: Int -> (Int, Int)
14 foo x = (1, x)
16 runTestStopWords = do
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)
24 test1 :: Test
25 test1 = TestCase (assertEqual "for (foo 3)," (1,2) (foo 3))
27 allTests :: Test
28 allTests = TestList [ TestLabel "stop words" test1 ]