Natural Language Processing · free preview
Sparse Retrieval with tf-idf
The vector space model, term frequency and inverse document frequency, cosine scoring, BM25, and the inverted index that makes ranking fast.
1. Sparse Retrieval with tf-idf
Sparse Retrieval with tf-idf
2. Inverse document frequency
A collection has documents and a term occurs in of them. Compute , rounding to three decimals.
3. Damped term frequency
A term appears 1 times in a document. Compute its tf as , rounding to three decimals.
4. A perfect cosine
A one-word document contains exactly the query's single term, with everything else zero. What cosine does the tf-idf scoring assign, and why?
5. What the postings list holds
A user queries two terms. How does the inverted index make scoring efficient?
6. The two knobs of BM25
In BM25, what do the parameters and control, and what happens at the extremes?
Practice this interactively
Free account · instant grading · spaced review that schedules itself.
Start this course for free