Skip to content

Commit

Permalink
Adjusted similarity check
Browse files Browse the repository at this point in the history
  • Loading branch information
geirawsm committed May 9, 2024
1 parent 245ea12 commit 5bd183f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sausage_bot/util/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def check_similarity(
'''
Check similarities between `input1` and `input2` (str), or `input1` and
items in `input2` (list). As standard it will check if the similarity
has a ratio between 98 % and 99.999999999999999999999999995 %. If that
has a ratio between 95 % and 99.999999999999999999999999995 %. If that
ratio hits, it will return the object it is similar with.
Otherwise, return False.
Expand All @@ -181,7 +181,7 @@ def similarity_helper(input1, input2, ratio_floor, ratio_roof):
ratio = float(SequenceMatcher(a=input1, b=input2).ratio())
# Our "similarity" is defined by the following equation:
if ratio_floor is None:
ratio_floor = 0.98
ratio_floor = 0.95
if ratio_roof is None:
ratio_roof = 0.99999999999999999999999999995
if ratio_floor <= ratio <= ratio_roof:
Expand Down

0 comments on commit 5bd183f

Please sign in to comment.