Skip to content

jessicasomaiya/trigrams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trigram Predictive Text

A Golang algorithm that uses trigrams to create predictive text, given training data.

Run

To run the program, run the command:

make run

The default port is :8080.

Learn

To train the algorithm using a POST request on /learn:

curl --header "Content-Type: text/plain" --data-binary @test_text.txt localhost:8080/learn

For example, to train the algorithm with The Wonderful Wizard of Oz:

curl --header "Content-Type: text/plain" --data-binary @training-data/wiz.txt localhost:8080/learn

More examples can be found in training-data. Credit to Project Gutenberg)

Generate

To generate predictive text, use a GET request on /generate:

curl http://localhost:8080/generate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published