SlideShare a Scribd company logo
Custom SpellSuggestor
Murthy Remella
Little history
• Spellchecker setup
• Default + word break dictionaries in collate mode
• multiple required text field information is stored in a single
text field and used as input
• Observations
* Spellchecker was moved to a different request handler
Examples
• Default spell checker limitations
• First suggestion is not always the best
‣ backpacks for gurls,
‣ Singulars/Plurals issue
‣ 15c calculator > 15c calculators
‣ Incorrect suggestions
‣ 6d tv > 6d HDTV
• Opportunities
• max paine
• fischer price
What are we looking to add?
• User behavior historically
❖ what are the similar searches ?
❖ How did user correct himself to fetch better results?
❖ How frequently did this happen?
• Context
❖ Is he looking for a toy or movie?
❖ Is this a brand name ?
Custom spellchecker
• How it works? set of algorithms which capture user input and
process and generate a set of candidate suggestion with
confidence score ( 0- 1)
Query validator Query Edits Score calculator
Confidence
generator
Suggestions
Demo ( will it work?)
Performance inputs
• Peter Novig’s edit generation vs Faroo’s
• Our algorithm considers the frequencies of all combinations of bigrams in the query. It generates all these
combinations and evaluates them on the fly. To prevent the algorithm from being un-predictable in terms of
performance for varying input token numbers we use a performance budget. A performance budget is used
instead of just counting tokens because in queries such as "How to train a dragon" only the tokens "train" and
"dragon" generate alternatives making it a two token query from performance point of view. We currently set
the budget at 50k combinations which reduces trigger rate by 0.6% of actual trigger rate. The rational for
limiting the number of tokens is that in a long query not correcting a token is not as adverse to search results
as a short query
Average Processing time
Peter Norvig 5.3 ms
Faroo’s 1.8 ms
Improvement 2.9x
Precision Metrics
• Precision metrics generated for top 1 million searches over an
year
• Conversion and $ benefits ( I can’t show data here :)
Threshold
Queries
corrected
Precision
0.9+ multi token 12000 99%
0.9+ single
token
4975 94%
0.87-.0.9 22190 81%
NDCG Measurements
Threshold Type of dataset Score
0.9+
default
spellchecker
0.34
0.9+
custom
spellchecker
0.52
0.87-.0.9
default
spellchecker
0.38
0.87-0.9
custom
spellchecker
0.46
Normalized discounted cumulative gain (NDCG) measures the performance of a recommendation system based on the
graded relevance of the recommended entities. It varies from 0.0 to 1.0, with 1.0 representing the ideal ranking of the
entities. This metric is commonly used in information retrieval and to evaluate the performance of web search engines.
What is cooking?
• Improving trigger rate
• Trigger rate is around 1-3% in our current model for confidence
scores of 0.87+
• Null searches are around 8% (approx.)
• Considering noise channel for probability of spell modification
• Opportunities in identifying the relation between the tokens to be
used for spell suggestion
Questions?
If you have any questions or would like to bounce
your ideas, please write to
murthy.remella@target.com
backup slides
How is this different?
• Find the most likely spell correction for the word
• Ex: Given, lates => it could be late, latest
• Find correction ‘c’ of all possible corrections, that maximizes the
probability of c given the original word w
• argmax P(c|w)
• argmax P(c) P(w|c) ( simplified )
• argmax language model * error model

More Related Content

PPTX
Test case design techniques
PPTX
The Finishing Line
PDF
Statistical Models Explored and Explained
PDF
Chapter7 abm book_noha_nagi
PDF
Solr Application Development Tutorial
PDF
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...
PPTX
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...
PDF
Async Code Reviews Are Killing Your Company’s Throughput - Dragan Stepanović
Test case design techniques
The Finishing Line
Statistical Models Explored and Explained
Chapter7 abm book_noha_nagi
Solr Application Development Tutorial
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...
Async Code Reviews Are Killing Your Company’s Throughput - Dragan Stepanović

Similar to Custom spellchecker for SOLR (20)

PPTX
Machine Learning From Movie Reviews - Long Form
PPTX
Every code coverage tool is measuring the wrong thing (on purpose)
PDF
Can we induce change with what we measure?
PDF
Search Analytics - Comperio
PPTX
Using Python and Data Science Practices in SEO Analysis of Data
PPT
Is Your Enterprise “fire-fighting” translation issues? Optimize the process w...
PDF
Amp Up Your Testing by Harnessing Test Data
PPTX
THAT Conference 2021 - State-of-the-art Search with Azure Cognitive Search
PPTX
Practical Relevance Measurement
PDF
Specification-by-Example: A Cucumber Implementation
PDF
Causal reasoning and Learning Systems
PDF
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
PDF
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
PDF
Creating a Data validation and Testing Strategy
PPTX
Training - What is Performance ?
PPTX
Getting the Most from MT + PE
PPTX
Test case design techniques
PPTX
SIGIR Tutorial on IR Evaluation: Designing an End-to-End Offline Evaluation P...
PPTX
10 Tips for Starting Test Automation from 0
PPTX
2016-08-22_winning_on_technicalities_for_linkedin
Machine Learning From Movie Reviews - Long Form
Every code coverage tool is measuring the wrong thing (on purpose)
Can we induce change with what we measure?
Search Analytics - Comperio
Using Python and Data Science Practices in SEO Analysis of Data
Is Your Enterprise “fire-fighting” translation issues? Optimize the process w...
Amp Up Your Testing by Harnessing Test Data
THAT Conference 2021 - State-of-the-art Search with Azure Cognitive Search
Practical Relevance Measurement
Specification-by-Example: A Cucumber Implementation
Causal reasoning and Learning Systems
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Creating a Data validation and Testing Strategy
Training - What is Performance ?
Getting the Most from MT + PE
Test case design techniques
SIGIR Tutorial on IR Evaluation: Designing an End-to-End Offline Evaluation P...
10 Tips for Starting Test Automation from 0
2016-08-22_winning_on_technicalities_for_linkedin
Ad

Recently uploaded (20)

PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPT
What is a Computer? Input Devices /output devices
PDF
August Patch Tuesday
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Modernising the Digital Integration Hub
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
The various Industrial Revolutions .pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
project resource management chapter-09.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
Programs and apps: productivity, graphics, security and other tools
PPT
Module 1.ppt Iot fundamentals and Architecture
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
What is a Computer? Input Devices /output devices
August Patch Tuesday
Univ-Connecticut-ChatGPT-Presentaion.pdf
Modernising the Digital Integration Hub
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
The various Industrial Revolutions .pptx
A novel scalable deep ensemble learning framework for big data classification...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
OMC Textile Division Presentation 2021.pptx
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
project resource management chapter-09.pdf
Web App vs Mobile App What Should You Build First.pdf
DP Operators-handbook-extract for the Mautical Institute
Programs and apps: productivity, graphics, security and other tools
Module 1.ppt Iot fundamentals and Architecture
Ad

Custom spellchecker for SOLR

  • 2. Little history • Spellchecker setup • Default + word break dictionaries in collate mode • multiple required text field information is stored in a single text field and used as input • Observations * Spellchecker was moved to a different request handler
  • 3. Examples • Default spell checker limitations • First suggestion is not always the best ‣ backpacks for gurls, ‣ Singulars/Plurals issue ‣ 15c calculator > 15c calculators ‣ Incorrect suggestions ‣ 6d tv > 6d HDTV • Opportunities • max paine • fischer price
  • 4. What are we looking to add? • User behavior historically ❖ what are the similar searches ? ❖ How did user correct himself to fetch better results? ❖ How frequently did this happen? • Context ❖ Is he looking for a toy or movie? ❖ Is this a brand name ?
  • 5. Custom spellchecker • How it works? set of algorithms which capture user input and process and generate a set of candidate suggestion with confidence score ( 0- 1) Query validator Query Edits Score calculator Confidence generator Suggestions
  • 6. Demo ( will it work?)
  • 7. Performance inputs • Peter Novig’s edit generation vs Faroo’s • Our algorithm considers the frequencies of all combinations of bigrams in the query. It generates all these combinations and evaluates them on the fly. To prevent the algorithm from being un-predictable in terms of performance for varying input token numbers we use a performance budget. A performance budget is used instead of just counting tokens because in queries such as "How to train a dragon" only the tokens "train" and "dragon" generate alternatives making it a two token query from performance point of view. We currently set the budget at 50k combinations which reduces trigger rate by 0.6% of actual trigger rate. The rational for limiting the number of tokens is that in a long query not correcting a token is not as adverse to search results as a short query Average Processing time Peter Norvig 5.3 ms Faroo’s 1.8 ms Improvement 2.9x
  • 8. Precision Metrics • Precision metrics generated for top 1 million searches over an year • Conversion and $ benefits ( I can’t show data here :) Threshold Queries corrected Precision 0.9+ multi token 12000 99% 0.9+ single token 4975 94% 0.87-.0.9 22190 81%
  • 9. NDCG Measurements Threshold Type of dataset Score 0.9+ default spellchecker 0.34 0.9+ custom spellchecker 0.52 0.87-.0.9 default spellchecker 0.38 0.87-0.9 custom spellchecker 0.46 Normalized discounted cumulative gain (NDCG) measures the performance of a recommendation system based on the graded relevance of the recommended entities. It varies from 0.0 to 1.0, with 1.0 representing the ideal ranking of the entities. This metric is commonly used in information retrieval and to evaluate the performance of web search engines.
  • 10. What is cooking? • Improving trigger rate • Trigger rate is around 1-3% in our current model for confidence scores of 0.87+ • Null searches are around 8% (approx.) • Considering noise channel for probability of spell modification • Opportunities in identifying the relation between the tokens to be used for spell suggestion
  • 11. Questions? If you have any questions or would like to bounce your ideas, please write to murthy.remella@target.com
  • 13. How is this different? • Find the most likely spell correction for the word • Ex: Given, lates => it could be late, latest • Find correction ‘c’ of all possible corrections, that maximizes the probability of c given the original word w • argmax P(c|w) • argmax P(c) P(w|c) ( simplified ) • argmax language model * error model