Data & Algorithm - Small English text sample used for training
Text cleaned: lowercase, removed punctuation/spaces
Build word pairs (bigrams)
For user input:
- Take last word
- Find most common next word in training data
- If no match → return fallback word