Files
GitMining/Main.hs
2015-04-03 22:48:20 +02:00

14 lines
388 B
Haskell

module Main where
import CSVParser
import Apriori
import qualified Data.Set as Set
main :: IO()
main = do
file <- readFile "out.csv"
case parseCSV file of
Left _ -> putStrLn "Could not parse out.csv"
Right val -> mapM_ (\x -> putStrLn (show x ++ "(" ++ show (count table x) ++ ")")) (concat (frequentPatterns 0.6 table)) where
table = map (ItemSet. Set.fromList .map Item) val