def calc_cosine_dist(text_a ,text_b): return pairwise_distances(text_a, text_b, metric='cosine')[0][0]