ranking/jaccard_similarity.py
def _jaccard(self, s1, s2):
        """
        Compute jaccard similarity between two sets
        """
        if (not s1) and (not s2):
            #print "Warning: two sets are empty"
            return 0
        return len(s1.intersection(s2))/float(len(s1.union(s2)))

        Compute jaccard similarity between two sets
        
Compute jaccard similarity between two sets
Compute jaccard similarity between two sets
def _jaccard(self, s1, s2):
        if (not s1) and (not s2):
            return 0
        return len(s1.intersection(s2))/float(len(s1.union(s2)))
def _jaccard ( self , s1 , s2 ) : if ( not s1 ) and ( not s2 ) : return 0 return len ( s1 . intersection ( s2 ) ) / float ( len ( s1 . union ( s2 ) ) )
Compute jaccard similarity between two sets
Compute jaccard similarity between two sets
"""
        Compute jaccard similarity between two sets
        """ #print "Warning: two sets are empty"
self
s1
s2