markly

Markov chain for text generation
git clone git://git.yotsev.xyz/markly.git
Log | Files | Refs | README | LICENSE

commit def2605cf49c3a80fdc71be55e634f04b2157616
parent 22b59ff1a4a29c73280ad6de2abdb54b3eb64a88
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Sat, 19 Jun 2021 17:07:10 +0100

Fix README

Diffstat:
MREADME.md | 40++++++++++++++++++++++++++++++----------
1 file changed, 30 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md @@ -61,16 +61,22 @@ Using a compiled chain: ## Options -`-s` Short form. Useful for text comprising of short strings on separate lines. +`-s` + +Short form. Useful for text comprising of short strings on separate lines. It takes the beginnings of such strings and stores them in a separate array from the rest of the grams. When generating a new string, a random beginning from the array is taken and expanded on using the chain. Use this if all the output strings start with "a" or something similarly predictable. -`-f [text.txt]` File. Select a file from which the to compiling a Markov chain +`-f [text.txt]` + +File. Select a file from which the to compiling a Markov chain and output text. For saving the chain see `-g`. -`-g text.txt [nameOfChain]` Generate. In addition to compiling the chain, it +`-g text.txt [nameOfChain]` + +Generate. In addition to compiling the chain, it saves it to nameOfChain.o3 where "o3" is added automatically depending on the specified order (see `-o`). When `nameOfChain` is omitted and there are supplied arguments afterwards, the chain is saved in chain.o3 with the same @@ -78,7 +84,9 @@ handling of the extension. By default there is no output but there is no restriction on it, you can still make the program generate text by passing `-n`/`-C` and `-l`/`-m`. -`-c nameOfChain.o3` Chain. Selects a compiled chain file for the text +`-c nameOfChain.o3` + +Chain. Selects a compiled chain file for the text generation. When loading a chain, specifying the order doesn't work because the chain is already compiled with a set order. The order is also automatically read from the chain so the whole argument can be omitted. The ".o3" extension @@ -86,18 +94,30 @@ doesn't play a role in the reading of the order, it's just there to help the user. The "3" in ".o3" is the order of the chain. The file extension should be read as "order 3". -`-o order` Order. Specifies the order of the compiled chain. +`-o order` + +Order. Specifies the order of the compiled chain. -`-n iterations` Iterations. Specifies number of iterations. +`-n iterations` -`-C` Continuous. Infinite iterations. +Iterations. Specifies number of iterations. -`-l length` Length. Specifies the length of the generated strings in characters. +`-C` -`-m` Maximum length. Generates text untill it reaches a gram with no following +Continuous. Infinite iterations. + +`-l length` + +Length. Specifies the length of the generated strings in characters. + +`-m` + +Maximum length. Generates text untill it reaches a gram with no following characters. -`-v` Verbose. It prints some status messages to standard error. +`-v` + +Verbose. It prints some status messages to standard error. ## License