Skip to content
Discussion options

You must be logged in to vote

We need to implement a spell checker that handles two types of spelling mistakes: capitalization errors and vowel errors. The solution involves checking the query word against the wordlist in a specific order of precedence: exact match, case-insensitive match, and then vowel-insensitive match.

Approach

  1. Exact Match Check: First, check if the query word exists exactly (case-sensitive) in the wordlist. If found, return the word as is.
  2. Case-Insensitive Check: If no exact match is found, convert the query word to lowercase and check if it matches any word in the wordlist case-insensitively. The first such match from the wordlist is returned.
  3. Vowel-Insensitive Check: If no case-insensitive mat…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@topugit
Comment options

topugit Sep 14, 2025
Collaborator

@mah-shamim
Comment options

mah-shamim Sep 14, 2025
Maintainer Author

Answer selected by topugit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested medium Difficulty
2 participants