ngrams-loader-0.1.0.1: Ngrams loader based on http://www.ngrams.info format

Portabilitynon-portable
Stabilityprovisional
MaintainerYorick Laupa <yo.eight@gmail.com>
Safe HaskellNone

Data.Ngrams

Description

 

Synopsis

Documentation

cmdExec :: Command a -> a -> Connection -> IO ()Source

sourceLines :: FilePath -> SourceT (ResourceT IO) TextSource

Creates a Source from the lines of a file, using the ResourceT monad to ensure the file is closed when processing the stream of lines is finished

parseLine :: MonadThrow m => Parser a -> ProcessT m Text aSource

Applies a Parser on each line. If an error occurs, an Exception is raised

saveDB :: Bool -> FilePath -> Command a -> ProcessT (ResourceT IO) a ()Source

Saves each entry in a SQLite database with submitted Command

mkProcess :: FilePath -> FilePath -> Bool -> Parser a -> Command a -> ProcessT (ResourceT IO) Text ()Source

runProcess_ :: ProcessT (ResourceT IO) Text a -> IO ()Source