1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| jshell> /open jshell/jaccard.txt
jshell> jaccard("abcde","abcde")
$3 ==> 1.0
jshell> jaccard("abcde","abcdf")
$4 ==> 0.6666667
jshell> jaccard("abcde","abfde")
$9 ==> 0.6666667
jshell> jaccard("abcde","abcgf")
$5 ==> 0.42857143
jshell> jaccard("abcde","abhgf")
$6 ==> 0.25
jshell> jaccard("abcde","aihgf")
$7 ==> 0.11111111
jshell> jaccard("abcde","jihgf")
$8 ==> 0.0
|