Add support for other similarity functions such as Jaccard, Overlap, and Dice, as was described in the paper.