This question is not new and i have seen some form of explanation here and here. Both methods described performing N grams (bigrams mostly) calculations on the terms of query 1 and query 2 and then finding the cosine similarity.
I was hoping for a clarification based on what i understand:
I need to get the TF-IDF score for all bigrams in query 1 and query 2 and then use that score to calculate the cosine similarity score. If this is so, would anyone be able to kindly write a simple python code for clearer explanation?