Compute the similarity between two lists

后端 未结 3 1344
遇见更好的自我
遇见更好的自我 2020-12-31 16:03

I\'d like to compute the similarity between two lists of various lengths.

eg:

listA = [\'apple\', \'orange\', \'apple\', \'apple\', \'banana\', \'ora         


        
3条回答
  •  Happy的楠姐
    2020-12-31 16:24

    From a theoretical point of view : I recommend you look up cosine similarity http://en.wikipedia.org/wiki/Cosine_similarity

    You may have to modify to fit your scheme, but the idea of cosine similarity is great.

提交回复
热议问题