Skip to content

A script that generates sentences / words using Markov Chains

Notifications You must be signed in to change notification settings

enisnazif/markov-sentence-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

markov-sentence-generator

A fun little script that generates new sequences of words or single words that are statistically similar in structure to an input text file using the Markov Chain model

Usage:

python generate.py <-w or -s> <input.txt> <length of sampling unit from text> <desired output length>

  • -w generates individual words
  • -s generates sentences

e.g:

python generate.py -s sample-data.txt 2 9

sample output:

seven and a half days since i saw his tall spare figure pass twice in a dark silhouette

About

A script that generates sentences / words using Markov Chains

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages