Assume we have a Tf-Idf matrix and a new query came. If this query has words that haven't been seen before, how can we find its vector and use the cosine similarity?
I've seen How do I calculate tf idf of a query that for each word of a query, we have to count the number of occurrences of this word in the query as tf, and for its idf, we have to use the idf for the word that has been found from the documents. But if the query has a new word, what will be this idf?
I'll be grateful if you could explain it to me.