Skip to content

Commit

Permalink
Fixed similarity edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
whitead committed Feb 10, 2023
1 parent f732ad3 commit f343de8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions paperqa/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def maybe_is_text(s, thresh=2.5):


def strings_similarity(s1, s2):
if len(s1) == 0 or len(s2) == 0:
return 0
# break the strings into words
s1 = set(s1.split())
s2 = set(s2.split())
Expand Down

0 comments on commit f343de8

Please sign in to comment.