ContraSim -- A Similarity Measure Based on Contrastive Learning