[ci skip] Update Levenshtein code with better attribution.
Lacks some proper creds to the homies who went the... distance ;)
This commit is contained in:
parent
dc75104948
commit
2b5ed618ed
@ -1,6 +1,8 @@
|
||||
module RailsGuides
|
||||
module Levenshtein
|
||||
# This code is based directly on the Text gem implementation
|
||||
# This code is based directly on the Text gem implementation.
|
||||
# Copyright (c) 2006-2013 Paul Battley, Michael Neumann, Tim Fletcher.
|
||||
#
|
||||
# Returns a value representing the "cost" of transforming str1 into str2
|
||||
def self.distance(str1, str2)
|
||||
s = str1
|
||||
|
@ -277,7 +277,9 @@ def self.sorted_groups
|
||||
|
||||
protected
|
||||
|
||||
# This code is based directly on the Text gem implementation
|
||||
# This code is based directly on the Text gem implementation.
|
||||
# Copyright (c) 2006-2013 Paul Battley, Michael Neumann, Tim Fletcher.
|
||||
#
|
||||
# Returns a value representing the "cost" of transforming str1 into str2
|
||||
def self.levenshtein_distance(str1, str2)
|
||||
s = str1
|
||||
|
Loading…
Reference in New Issue
Block a user