ainzzorl / goodcode

A curated collection of annotated code examples from prominent open-source projects
https://codecatalog.org
Creative Commons Attribution 4.0 International
198 stars 8 forks source link

[NEW EXAMPLE] Ruby - Did you mean? #48

Closed ainzzorl closed 3 years ago

ainzzorl commented 3 years ago

General

Description

did_you_mean is a typo-detecting gem that ships with Ruby since Ruby 2.3.

We can just focus on the spell-checker. It's based on Levinstein distances.

Links

Add links to the code. Include tests.

https://github.com/ruby/ruby/blob/master/lib/did_you_mean

What makes it interesting

Related work

No

Other

N/A