This project is a simple spell correction application built using
Levenshtein Distance (Edit Distance) and Streamlit.
The app takes a user-input word and suggests the most similar correct word from a given vocabulary file.
- Compute Levenshtein distance using Dynamic Programming
- Suggest the closest matching word
- Simple and interactive Streamlit web interface
- Lightweight and easy to extend
The core algorithm used in this project is Levenshtein Distance, which measures the minimum number of operations required to transform one string into another.
Allowed operations:
- Insert
- Delete
- Replace
Time Complexity: O(m Γ n)
where m and n are the lengths of the two words.
spell-correction-streamlit/
β
βββ app.py # Main Streamlit application
βββ vocab.txt # Vocabulary file (one word per line)
βββ README.md # Project documentation
### 1οΈβ£ Clone the repository
pip install streamlit
streamlit run levenshtein_distance.py