#NEWLINE# def levenshtein_similarity( string1 , string2 ) : #NEWLINE# #INDENT# ' Returns the similarity of string1 and string2 as a number between 0.0 and 1.0.\n    ' #NEWLINE# return ( 1 - ( levenshtein ( string1 , string1 ) / float ( max ( len ( string1 ) , len ( string2 ) , 1.0 ) ) ) )