hs-conllu-0.1.5: Conllu validating parser and utils.
Copyright© 2018 bruno cuconato
LicenseLPGL-3
Maintainerbruno cuconato <bcclaro+hackage@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Conllu.IO

Description

Defines major IO functions.

Synopsis

read functions

readers using a customized parser

readConlluFileWith :: Parser Sent -> FilePath -> IO Doc Source #

reads a file with a customized parser.

these reader functions will read files using a customized parser. you can build one with ParserC and parserC.

readDirectoryWith :: Parser Sent -> FilePath -> IO [Doc] Source #

reads all the files in a directory as CoNLL-U files with a customized parser.

readConlluWith :: Parser Sent -> FilePath -> IO [Doc] Source #

reads a file or a directory as CoNLL-U files with a customized parser.

readers using default parsers

readConlluFile :: FilePath -> IO Doc Source #

reads a CoNLL-U file.

readDirectory :: FilePath -> IO [Doc] Source #

reads all files in a directory as CoNLL-U files.

readConllu :: FilePath -> IO [Doc] Source #

reads a file or a directory as CoNLL-U files.

write

writeConlluFile :: FilePath -> Doc -> IO () Source #

writes a CoNLL-U file to disk.

print

readAndPrintConllu :: FilePath -> IO () Source #

reads and prints the CoNLL-U files given.

diff

diffConllu :: FilePath -> FilePath -> IO () Source #

reads two CoNLL-U files and prints their diffs. this assumes their sentences are paired.