UpStart Commerce Search
Spell Correction
How Does Spell Correction Work?
3min
nochannel search offers two spell correction solutions, each with its unique advantages option 1 like a built in dictionary (opensearchbased) this option acts like a helpful store employee, checking dictionaries and suggesting alternatives it uses a built in "dictionary" within your search engine to propose corrections for misspelled searches this straightforward approach is effective for common typos option 2 smarter and faster (nochannel search mlbased) similar to a tech savvy assistant, this option utilizes nochannel search’s artificial intelligence (ai) and machine learning (ml) technology it tackles complex typos, understanding the intended search term even if the misspelling is a real word this advanced approach ensures precise results, particularly for unusual typos both options have their strengths opensearchbased easier to set up and works well for most cases mlbased more accurate and handles even unusual typos, requiring a bit more technical work when a user searches for a term, nochannel search creates a set of modified words by making modifications this process generates a list of candidate words based on modifications example imagine you search for "shoel" on a website since "shoel" isn't found in the site's specific dictionary ( built from the content in product types and attributes ), nochannel search uses a custom approach to suggest corrections shoe remove an “l” is a common type adding an "s" is a common typo shoelace adding “a”, “c” and “e” is another possibility nochannel search doesn't rely on a traditional dictionary but builds a custom one from the website's data this ensures corrections are relevant to the website's content additionally, context is considered through a process called n gram modeling this technique analyzes sequences of words (n grams) to predict the most likely next word based on the surrounding text how does it work? here's a breakdown of how nochannel search suggests corrections all enabled spell check fields and their data are used to create a corpus, essentially a collection of text used for analysis the corpus goes through preprocessing, which might involve removing duplicates and preparing the text for analysis an n gram model is built from the corpus this model analyzes sequences of words (n grams) to understand the relationships between them assuming the first character is correct, spell correction finds similar words based on the n gram model each suggested correction receives a score based on its likelihood based on the n gram model nochannel search suggests the corrections with the highest scores, even if they might seem nonsensical in a general context