What is it supposed to do? I try to type a sentence but it is immediately garbled by random words. If there were two boxes, one for input and output, things wouldn't get mixed up, or perhaps a "Shakespearize" button. Right now the edit box is not really usable because the script interferes with normal editing.
EDIT: Another note, while the references to Shannon & Markov chain are correct, in NLP this would more commonly be referred to as a character n-gram model.
It's meant to interfere with your writing, like a backseat driver interferes with your driving. Your idea of separation is interesting, do you see it as a kind of translator?
I imagine a backseat driver shouts suggestions, but does not take over the wheel; like the way autocomplete is there without preventing you from typing something else. It doesn't have to be a translator, but there should be some distinction between user input and what comes from the model, and the user should have the final say.
It seems to be buggy? There were 9 JavaScript errors in the process of typing, "How do I compare thee to a summer's day?" (I know that's not the original text of the sonnet.)
Yeah, only listing the top 10 chars to write next results in a few misses. Its also bit of a pain to test a recursive function that uses random numbers.
I can understand that, but in a web app like yours which is meant to be very responsive, I think you would be better served by handling misses rather than letting errors throw away the stack (so to speak) every time a miss happens.
So it's a full-sentence auto-completer? Interesting; would be nice if it would wait for a whole word (or at least a second without typing) before completing though
Gibberish I guess. Doing a lookahead for letters was how I started, and its kinda interesting to see how it turned out as a quick project. Storing the probabilities for each letter given a string prefix is the limiting factor, and took a bit of effort to get it to reasonable size for a browser. I think using words instead of letters may result in better sentences with the same amount of space though...
I think this is a really neat side project. It's almost like a chatbot where you drive. If you can get sentence structure working by doing intelligent stuff with the tokens it could be even cooler. What do you do fulltime?
I build web trading apps for banks. Big, big javascript apps that stream prices and handle trades. Not the kind of apps that require shakespearean spam though...
EDIT: Another note, while the references to Shannon & Markov chain are correct, in NLP this would more commonly be referred to as a character n-gram model.