Skip to content

zgoldman11/sp-three-gram

Repository files navigation

sp-three-gram

Zachary Goldman

7/17/19

Sparkpost Takehome: Trigrams

Incomplete solution - power went out

Testing has not been extensive, many errors unchecked (improper input, file not there)

Works with .txt files from the gutenberg digital library

Replace 'filename' with the actual filename and include extention

File must be present in directory

Time spent: 4.5 hours

Usage:

"node trigram.js" this opens interactive commands

then: "upload filename" to add a file

"files" to print a list of files

"file id= filename" to return info about the file

"generate file= filename maxSize= size seedWords= word1 word2" to generate a file

"exit" to exit

readline function inspired from: https://stackoverflow.com/questions/24464404/how-to-readline-infinitely-in-node-js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published