Minimalistic 1st order Markov model for natural language generation.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langurmonkey 52a31cd27f
4 years ago
20000-leagues-under-sea.txt Fix book name 4 years ago Readme 4 years ago Initial import 4 years ago

Markov chain for NL is a very minimalistic order-1 Markov model for natural language generation. It takes a file with a text and generates n sentences using a Markov chain. Just for fun. Original source is here.


The following line generates 20 sentences using file.txt as input.

$ file.txt 20

For example, using the open domain book "20000 leagues under the sea" by Jules Verne:

$ 20000-leagues-under-sea.txt

Contempt for the ocean it must have to a thousand miles an enthusiastic colourist. 
Nemo. Whiskers like the ships bottom of the quays and not see how to keep ones self
Professor that before Vanikoro. Disheartened. Returning to finish please. Prompt his
movements and I saw floating under water is introduced which is there are real.
Advantageously as a submerged But the air by this book which were profoundly dark
spots. Landscape Captain you maintain yourselves in the day before. Ensued. Date.

For more help, use:

$ --help