Skip to content

HyejinWon/ngram-sentence-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ngram-sentence-generator

This is a 'n-gram sentence generator' and 'calculate bi-gram sentence probability'


sentence generator

sentence generator based on char type. If you want to use your file, just change file name

This code can generate only 3,4,5 gram. But, you can also change the range.

Start

Start the code, python wait your input. Then, you just press the n-gram number. after generate sentence, code is done.


sentence probability

calculate sentence probaility also based on char type.

This code based on previous sentence_generator.py 's bigram pickle. So, If you want to run this code should have to make 2gram.pkl from sentence_generator.py

About

n-gram sentence generator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages