This is an attempt at calclating Levenshtein distance between emails.
- ruby-2.6.3
- rails 6.0.1
- postgres >= 9.3
- Clone this repo
- Run
make setup
- Modify the .env file with your credentials
- Run
make server
- Navigate to
http://localhost:3000/
- Click on Refresh Data
Optional:
- run
make calculate_dld
- Wait for sidekiq to finished all the jobs
- Navigate to
http://localhost:3000/users/possible_duplicate_emails?quick_calc=false
- Implement error notification
- Implement specs
- Find more string matching algorithms
- Run
make test
Warning: Currently using beta gem 'rspec-rails', '~> 4.0.0.beta3'
due to bug listed here: https://stackoverflow.com/questions/58581334/generated-rspec-controller-test-is-failing-with-wrong-number-of-arguments-given
rails new ruby-levenshtein-example --database=postgresql --skip-action-mailer --skip-action-mailbox
rake db:setup
rails generate rspec:install
rails g model users first_name:text last_name:text display_name:text email:text title:text ss_data:jsonb
rails g model similar_emails email_1:text email_2:text levenshtein_distance:integer damerau_levenshtein_distance:integer