Skip to content

sheik/golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To generate text using this table we select an initial prefix ("I am", for example), choose one of the suffixes associated with that prefix at random with probability determined by the input statistics ("a"), and then create a new prefix by removing the first word from the prefix and appending the suffix (making the new prefix is "am a"). Repeat this process until we can't find any suffixes for the current prefix or we exceed the word limit. (The word limit is necessary as the chain table may contain cycles.)

Our version of this program reads text from standard input, parsing it into a Markov chain, and writes generated text to standard output. The prefix and output lengths can be specified using the -prefix and -words flags on the command-line.

About

some go code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published