add word prediction code from TypeOver