press z to generate text using a markov chain
this is almost done. almost. I'll keep working on this until it works. or until someone else makes it work.
usage:
place the markov function in your code
markov(input text,n-gram length,[output length] |
input text - string, required
this is the string you want to use to teach the neural network with. it's used to populate a table of n-grams, then later to build the output string
n-gram length - integer, required
the length of each n-gram. an n-gram is a string of characters with a length of n. these are pulled out of the input text by stepping through it character by character
output length - integer, default 32
how long the outputted string should be
known issues:
- lookit that wacky output
- it sometimes hangs if the input text is too short (this shouldn't be a problem with a good paragraph. a standard lorem ipsum or navy seal pasta works fine)
- it's probably poorly optimized and messy
based on this
with help from Sean, justinj, and TheTomster in discord
[Please log in to post a comment]