hmark-1.0.0: A tool and library for Markov chains based text generation.

Text.Generators.Markov

Synopsis

Documentation

trainFromStdin :: DBS -> IO ()Source

Reads newline-separated phrases from STDIN and learns from them

burstFromStdin :: DBS -> IO ()Source

Reads newline-separated lines from STDIN and replies to STDOUT

buildSource

Arguments

:: DBS

Databases

-> (String, String)

Starting words

-> IO [String]

Result

Attempts to build a phrase using given two words and databases

openDBs :: String -> IO DBSSource

Opens databases with given basename

closeDBs :: DBS -> IO ()Source

Closes databases

riffSource

Arguments

:: DBS

Databases

-> [String]

Starting phrase

-> IO (Maybe [String])

Maybe result

Attempts to build a phrase based on given one

type DBS = (BDB, BDB)Source

Databases set