Open-Source Android Keyboard Gets Statistical Next-Word Prediction Engine
CodeKeyboard, an open-source Android keyboard built for programmers, has been upgraded with a trigram-based next-word prediction model trained on a 583MB corpus of blogs, news, and Twitter text. Three smoothing algorithms were evaluated — Kneser-Ney, Katz backoff, and a SwiftKey-inspired variant called WDP — with the WDP approach ultimately chosen for its 31% smaller file size while maintaining 99.2% agreement with the Katz model. An early pipeline built on AWS failed due to memory exhaustion, but a redesigned streaming SQLite approach reduced the full build time to 11 minutes on a spot instance. Vocabulary testing across four size caps found that 64,000 words covers 99.3% of real next-word targets, striking the best balance between coverage and size. The final model packages all prediction data into a single 22MB file, shrinking the overall APK from 302MB down to 94MB.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in