Skip to content

A tool that utilizes Markov chains, produced from text files, to generate brand new sentences.

License

Notifications You must be signed in to change notification settings

atlijas/markovician

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markovician

Markovician is a tool that utilizes Markov chains, produced from any given text file, to generate brand new sentences.

Basic usage

from markov import MarkovChain
Markov = MarkovChain(file = 'test_files/pride_tokenized.txt', n_chunks = 2)
generated_text = (Markov.format_sent())
print(generated_text)

The higher n_chunks, the more realistic the output (which also makes Markovician likelier to produce an already existing sentence). This can be prevented by comparing the generated sentence to existing sentences, as seen in tester.py.

About

A tool that utilizes Markov chains, produced from text files, to generate brand new sentences.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages