| Portability | non-portable |
|---|---|
| Stability | provisional |
| Maintainer | Yorick Laupa <yo.eight@gmail.com> |
| Safe Haskell | None |
Data.Ngrams
Description
- module Data.Ngrams.Database.Sqlite
- parserBigram :: Parser Bigram
- parserTrigram :: Parser Trigram
- parserQuadgram :: Parser Quadgram
- parserPentagram :: Parser Pentagram
- data ParseException = ParseException !String
- sourceLines :: FilePath -> SourceT (ResourceT IO) Text
- parseLine :: MonadThrow m => Parser a -> ProcessT m Text a
- saveDB :: Bool -> FilePath -> Command a -> ProcessT (ResourceT IO) a ()
- mkProcess :: FilePath -> FilePath -> Bool -> Parser a -> Command a -> ProcessT (ResourceT IO) Text ()
- runProcess_ :: ProcessT (ResourceT IO) Text a -> IO ()
Documentation
module Data.Ngrams.Database.Sqlite
parserBigram :: Parser BigramSource
parserTrigram :: Parser TrigramSource
parserQuadgram :: Parser QuadgramSource
parserPentagram :: Parser PentagramSource
data ParseException Source
Constructors
| ParseException !String |
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