Skip to content

Instantly share code, notes, and snippets.

@pranjalAI
Created November 28, 2020 18:28
Show Gist options
  • Save pranjalAI/d77b5ccedd9ccc5a22cdf6b6524d2615 to your computer and use it in GitHub Desktop.
Save pranjalAI/d77b5ccedd9ccc5a22cdf6b6524d2615 to your computer and use it in GitHub Desktop.
my_doc=get_doc(my_link)
query_doc=[w.lower() for w in word_tokenize(my_doc)]
Query_doc_bow=dictionary.doc2bow(query_doc)
Query_doc_tfidf= tf_idf[Query_doc_bow]
final_list=list(sims[Query_doc_tfidf])
Best_match_index=final_list.index(max(final_list))
Output=data.iloc[Best_match_index]["publication"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment