Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create new sentence and vectorize it.
- new_sentence = "this is a new sentence".split(" ")
- new_sentence_vectorized = model.infer_vector(new_sentence)
- # Calculate cosine similarity.
- model.docvecs.most_similar(positive=[new_sentence_vectorized])
Add Comment
Please, Sign In to add comment