Markov-chain library written in Bash for some reason
(from the demo.sh
script)
#!/bin/bash
INFILE=raw-data.txt
BARTLIB_DATADIR=bart-data
source bartlib.sh
[[ -d $BARTLIB_DATADIR ]] || mkdata $INFILE
while read LINE; do
linefromwords $LINE
done
mkdata FILENAME
- Create or add to the db directory ($BARTLIB_DATADIR
) using the contents of the named filestore_line WORDS
- Store a single line of input into the dblinefromwords WORDS
- Generate some random output seeded by one of the given words at randomsearchphrase WORDS
- Build output based on the phrase provided verbatim, not just one random word from itrandomline
- Generate a completely random line