Skip to content

Commit

Permalink
Enhancement of the decimal percent of similarity in levenshtein_distance
Browse files Browse the repository at this point in the history
  • Loading branch information
a-elhaddad authored and gunthercox committed Feb 6, 2017
1 parent 73b3187 commit e0ce0fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chatterbot/comparisons.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def levenshtein_distance(statement, other_statement):
)

# Calculate a decimal percent of the similarity
percent = int(round(100 * similarity.ratio())) / 100.0
percent = round(similarity.ratio(), 2)

return percent

Expand Down

0 comments on commit e0ce0fe

Please sign in to comment.