Skip to content

Spelling corrector application. It is designed to take a misspelled word as input and suggest possible corrections based on a provided dataset.

License

Notifications You must be signed in to change notification settings

PiyushRaj714/spelling-corrector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

spelling-corrector

This repository contains a Python script for a simple spelling corrector. It is designed to take a misspelled word as input and suggest possible corrections based on a provided dataset.

How it works

The spelling corrector utilizes a technique known as edit distance to find the most likely correct word based on the input. It calculates the edit distance between the misspelled word and each word in the dataset, considering operations such as deletion, insertion, substitution, and transposition of characters. The suggested corrections are ranked based on their edit distance score.

Getting Started

To use the spelling corrector, follow these steps:

Clone this repository to your local machine or download the source code files. git clone https://github.com/PiyushRaj714/spelling-corrector.git Make sure you have Python installed on your system (version 3.0 or higher).

Install the required dependencies. The script uses the editdistance library, which can be installed using pip:

pip install editdistance Modify the provided dataset in the words.txt file or replace it with your own dataset. Each word should be on a separate line.

Run the spelling_corrector.py script, providing the misspelled word as input:

python spelling_corrector.py coreecrotr The script will output the suggested corrections for the provided word.

Customization

You can modify the script according to your needs. Some possible customizations include:

Implementing additional algorithms or techniques for improved spelling correction.

Adding more datasets or using a different dataset for training. Modifying the ranking or scoring mechanism for suggested corrections. Contributions Contributions are welcome! If you have any suggestions or improvements, feel free to create a pull request or open an issue in the repository.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgments

The script is based on the principles of the Norvig's spelling corrector and is inspired by Peter Norvig's article "How to Write a Spelling Corrector".

Contact

For any further questions or inquiries, you can reach out to me through my GitHub account PiyushRaj714.

About

Spelling corrector application. It is designed to take a misspelled word as input and suggest possible corrections based on a provided dataset.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages