Madame Cassandra Word Predictor

acarloto
July, 2015

The Applet

the applet

Hunder the Hood

the process

  • stripTease( ) cleans the input text.

  • stringToWords( ) returns the last words of text.

  • lookUp( ) finds the three most probable tetragrams, trigrams or bigrams.

  • lastStrip( ) strips the output strings given the last word.

  • inOut( ) wraps up the previous functions.

Performance

Caution: Madame Cassandra is not always right!

  • I often drink a beer or two

  • He deserves a badge of honor

  • Wait! this is only a bag of chips

  • The next US president will be Donald trump

Go and Try It!