Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spell_checker.py #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hasan-Mesbaul-Ali-Taher

Pull Request: Updating prediction() in source.spell_checker to handle empty strings

Description:

This pull request addresses an issue in the prediction() function within the source.spell_checker module. The issue involves the presence of empty strings (" ") within the list of words in a sentence, which can affect the spell-checking process and subsequent operations. This pull request proposes a change to the prediction() function to remove empty strings from the list of words before performing other tasks.

Changes Proposed:

In the prediction() function of source.spell_checker, I have added a preprocessing step to filter out empty strings from the list of words in a given sentence.

Screenshots:

The provided screenshots demonstrate the difference between the original and modified versions of the code. The modified version correctly handles empty strings.

Original Version:

image

Modified Version:

image

updating prediction():
To remove empty string (" ") from the list of words in a sentence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant