PW
Aug 23, 2015
Have you ever been frustrated with the need to type out every word letter-by-letter, especially when using mobile devices with soft keyboards? Enter text prediction software… an effective means of improving typing efficiency and overall user experience.
This shiny-based application showcases a light-weight implementation of this technology, featuring:
General Characteristics of N-Gram Models:
Kneser-Ney Smoothing Interpolation
Using the model as-is on the shiny platform is incredibly simple:
prediction <- generatePKN("happy", "happy new", n=3, uniDF, biDF, triDF, numReturn = 4, knDiscApprox(uniDF,biDF,triDF))
| Predicted.Word | Word.Probability | Unigram.Count | |
|---|---|---|---|
| 434 | year | 0.8441687 | 12533 |
| 34 | birthday | 0.1461212 | 4376 |
| 258 | mothers | 0.0558350 | 2003 |
| 264 | new | 0.0338841 | 25870 |