https://github.com/ersinaksar/spelling-error-correction
information retrieval SpellingCorrector with Peter Norvig Approach
https://github.com/ersinaksar/spelling-error-correction
information-retrieval python spell-check spellcheck spelling-correction spelling-corrections
Last synced: 3 months ago
JSON representation
information retrieval SpellingCorrector with Peter Norvig Approach
- Host: GitHub
- URL: https://github.com/ersinaksar/spelling-error-correction
- Owner: ersinaksar
- License: gpl-3.0
- Created: 2021-05-25T10:15:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T21:36:10.000Z (over 2 years ago)
- Last Synced: 2025-02-05T20:03:17.693Z (4 months ago)
- Topics: information-retrieval, python, spell-check, spellcheck, spelling-correction, spelling-corrections
- Language: Python
- Homepage:
- Size: 2.25 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Spelling Error Correction
*Read this in other languages: [English](README.md), [Turkish](README.tr.md).*
This code is an implementation of a spelling checker that checks if words from a specified dictionary file are spelled correctly. The application works by determining the most probable correction candidate for a word. It creates a Counter object that counts the occurrences of all words in the specified word dictionary file and calculates the probabilities of possible words. The correction candidates are generated using functions that include all possible modifications such as deleting adding or changing a letter in the word. Among these correction candidates those that are known to exist in the word dictionary file are selected and if there is no possible correction candidate the word itself is chosen. To determine if the corrected words are correct the program compares them to a list of correct words read from a correct word list file. Finally the program calculates an accuracy score based on the number of correctly matched words. The user can select the word dictionary file and the correct word list file and an output file is created that contains the corrected words matched to the correct words.
🧐 Features
Here're some of the project's best features:
* SpellingCorrector with Peter Norvig Approach
🛠️ Installation Steps:
1. You should just run the program from terminal with python SpellingCorrector command or open a python editor and select the SpellingCorrector.py file and run it. The program ask you 3 file name. First one is for dictionary file. Second one for misspelled word file which will use for prediction and finally third one for correct word file. Third file for calculate accuracy of the prediction.
2. The program ask you 3 file name. First one is for dictionary file. Second one for misspelled word file which will use for prediction and finally third one for correct word file. Third file for calculate accuracy of the prediction.
💻 Built with
Technologies used in the project:
* Python
* NLP
* Sklearn