Skip to content

Platypus27-coder/spell-correction-streamlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spell Correction with Levenshtein Distance (Streamlit)

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.


πŸš€ Features

  • Compute Levenshtein distance using Dynamic Programming
  • Suggest the closest matching word
  • Simple and interactive Streamlit web interface
  • Lightweight and easy to extend

🧠 Algorithm

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.


P/S: You can find this problem in LeetCode (Edit Distance)

πŸ“ Project Structure


βš™οΈ Installation

spell-correction-streamlit/
β”‚
β”œβ”€β”€ app.py # Main Streamlit application
β”œβ”€β”€ vocab.txt # Vocabulary file (one word per line)
β”œβ”€β”€ README.md # Project documentation
### 1️⃣ Clone the repository

Install dependencies and Run the Application:

pip install streamlit

streamlit run levenshtein_distance.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages