A Python project for implementing word prediction algorithms.
- Naive word prediction: A simple approach that predicts the next word or word sequence based on frequency counts of word sequences in the training corpus.
- Assumes there are no broken sentences, i.e. new line within a sentence.
- Is case sensitive
- Considers only
’as appostrope
- Python 3.13+
- Redis server
- Install dependencies:
pip install -e .- Start Redis server:
redis-serverBefore running, update the FILE_NAME variable in src/config.py to point to your corpus text file.
Run the prediction script:
./predict-next-word.sh./predict-next-word-sequence.sh