'Did you mean?' experience in Ruby and beyond
summary
Did_you_mean gem adds a Google‑like suggestion to Ruby and claims to turn NameError into helpful corrections; it uses a dictionary of symbols, computes Levenshtein and Jaro‑Winkler (yellow‑winkler) distances with a prefix bonus, and limits searches with context‑specific finders to avoid scanning ~20,000 symbols. An evaluated change raises accuracy from ~54% to about 80% by adding Jaro‑Winkler and heuristics. A shown attribute_name_finder pulls column names from ActiveRecord and successfully suggests likely attribute typos; emoji suggestions also work.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:07Digital mean experience
- 4:10What is a spell checker
- 11:48How many symbols are defined
- 14:35How accurate is it
- 16:34Mistypes
- 17:58Yellow Winkler Distance
- 18:28M and T
- 18:45Matching window
- 19:57Calculate distance
- 20:10Cultivate prefix bonus
- 21:42Misspell correction
- 22:38Evaluation
- 24:25Finding
- 27:18Whats next
- 28:32Emojis
- 28:49Questions








