Skip to content

A simple and efficient spelling correction system that uses Python's rapidfuzz library to find and correct misspelled sentences by matching them with the closest correct ones from a given dataset.

Notifications You must be signed in to change notification settings

Ladanividhi/Misspelling-Correction

Repository files navigation

πŸ“ Spelling Correction Using Closest Match

A simple Python-based spelling correction project developed for BhashaTHON. It uses basic string similarity to suggest the most likely correct sentence for a given misspelled one.

πŸ“‚ Project Structure

Spelling_Correction/  
β”œβ”€β”€ main.py                   # Main logic for correction  
β”œβ”€β”€ Problems.txt              # File with misspelled sentences  
β”œβ”€β”€ artificial.train.tgt      # File with correct reference sentences  
β”œβ”€β”€ english_eval.corrected.txt # Output: corrected results  
β”œβ”€β”€ requirements.txt          # Dependencies  
└── README.md                 # Project documentation  

πŸ”§ How It Works

  • Takes misspelled sentences from Problems.txt.
  • Compares each with the reference list from artificial.train.tgt.
  • Finds the closest match using string similarity (Levenshtein-like approach via difflib).
  • Saves the corrected sentences to english_eval.corrected.txt.

πŸš€ Getting Started

πŸ“¦ Prerequisites

  • Python 3.x
  • pip

πŸ”§ Installation

git clone https://github.com/Ladanividhi/Misspelling-Correction.git
cd Misspelling-Correction
pip install -r requirements.txt

▢️ Run the Project

python main.py

The output will be saved to english_eval.corrected.txt.

πŸ–₯️ Environment

  • OS: Windows / Linux / macOS
  • Python: 3.x
  • Libraries: rapidfuzz or built-in difflib (depending on usage)

πŸŽ₯ Demo

You can find a demo walkthrough of the project in the included video file: Video.mp4.

πŸ‘¨β€πŸ’» Team: Code Crafters

  • Ladani Vidhi
  • Dhyey Shah
  • Palak Kanjiya
  • Parth Chandegara

βœ… Key Takeaways

This project showcases a straightforward yet impactful method for correcting misspelled sentences using Python's string similarity tools. It is designed to be lightweight, easy to implement, and a great starting point for those exploring the world of natural language processing.

Thank you for taking the time to explore our project. We appreciate your interest and support.
– Team Code Crafters

About

A simple and efficient spelling correction system that uses Python's rapidfuzz library to find and correct misspelled sentences by matching them with the closest correct ones from a given dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages