Guest User

Untitled

a guest
Jan 17th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # Create new sentence and vectorize it.
  2. new_sentence = "this is a new sentence".split(" ")
  3. new_sentence_vectorized = model.infer_vector(new_sentence)
  4.  
  5. # Calculate cosine similarity.
  6. model.docvecs.most_similar(positive=[new_sentence_vectorized])
Add Comment
Please, Sign In to add comment