Similarity measures for bags