iair kleiman
August 2015
Coursera - JHU
The objetive of this app is to allow the user to write a sentence and to constantly predict the intended next word
The used prediction Algorithm was Simple Interpolation
This is a better method in this case than Stupid Backoff
It will sum the weighted probability of a word based on each (1-4) N-Gram
\[ P(interp) = \lambda _{4}P(4Gram)+ \lambda _{3}P(3Gram)+\lambda _{2}P(2Gram)+\lambda _{1}P(1Gram) \]
For the Frase: “Can you follow me please? It would mean the
| last_word | prob4 | prob3 | prob2 | prob1 | Prob_Interp |
|---|---|---|---|---|---|
| world | 0.35 | 0.35 | 0.0325 | 0.0003426 | 0.7328427 |
| kind | 0.00 | 0.00 | 0.0250 | 0.0000414 | 0.0250414 |
| climate | 0.00 | 0.00 | 0.0175 | 0.0000035 | 0.0175035 |
| time | 0.00 | 0.00 | 0.0150 | 0.0002928 | 0.0152928 |
| board | 0.00 | 0.00 | 0.0150 | 0.0000472 | 0.0150472 |
| horse | 0.00 | 0.00 | 0.0150 | 0.0000109 | 0.0150109 |
Follow the link https://ikleiman.shinyapps.io/Capstone2