We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af90c42 commit 5202c9fCopy full SHA for 5202c9f
1 file changed
ppjoin/ppjoin_.py
@@ -33,6 +33,10 @@ def overlap_constraint(len_s1, len_s2, threshold):
33
34
35
def jaccard(a, b):
36
+ if not isinstance(a, set):
37
+ a = set(a)
38
+ if not isinstance(b, set):
39
+ b = set(b)
40
return 1.0 * len(a & b) / len(a | b)
41
42
0 commit comments