0

I want to implement a sentence similarity algorithm. Is it possible to implement it using sequence prediction algorithm? If it is possible what kind of approach should i go forward with or is there any other method which is more suitable for sentence similarity algorithm ,please share your views.

Aniruddh
  • 188
  • 5
  • 24

2 Answers2

2

You could try to treat your sentences as separate documents and then use traditional approach for finding similarity between documents. It was answered here using sklearn: Similarity between two text documents If you want, you could try and implement the same code in tensorflow.

I also strongly recommend to read this answer, which covers more sophisticated approaches: https://stackoverflow.com/a/15173821/3633250

Community
  • 1
  • 1
Maksim Khaitovich
  • 4,742
  • 7
  • 39
  • 70
  • Thanks for the info Maxim .One more question though on the first link you have mentioned ,are the solutions mentioned similar to word2vec conversion and should I drop the idea of using sequence prediction . – Aniruddh Nov 22 '16 at 08:20
  • @Aniruddh sorry, I didn't follow your second question - in your original question there is nothing about sequence prediction. – Maksim Khaitovich Nov 22 '16 at 15:22
1

You could consider using Doc2Vec. Each sentence (document) is mapped to an n-dimensional space. To find the most similar document,

model.most_similar(“documentID”)

Reference

user799188
  • 13,965
  • 5
  • 35
  • 37