The predictive engine employs an \(N\)-gram language modeling approach with back-off fallback:
- Trigram Match (\(N=3\)): Given the last two typed words \((w_{i-2}, w_{i-1})\), search for the candidate \(w_i\) maximizing \(P(w_i \mid w_{i-2}, w_{i-1})\).
- Bigram Fallback (\(N=2\)): If no matching trigram exists, back off to \((w_{i-1})\) to find the most probable \(w_i\).
- Unigram Fallback (\(N=1\)): If an unseen term is entered, default to the corpus mode (e.g., “the”).
- Pruning: Frequency matrices were pruned by removing singleton occurrences, reducing RAM usage by > 85%.