Notes on Introduction to Information Retrieval, Chap. 6 (Scoring, term weighting and the vector space model)
6.1 Parametric and zone indexes
Digital documents come with metadata. Metadata includes fields (e.g. creation date, file format). Field values are part of a finite set. Each field has one parametric index.
Hence, query processing: merge(standard inverted index, parametric index)
Zones are like fields, but its contents are not part of a finite set, but free text (e.g. document title, abstracts). Numerous approaches to indexing zones:
- Build separate inverted index for each zone
(dict) william.abstract -> (postings) {11, 121, 1441}william.title -> {2, 4, 8, 16}
- Encode zone in which a term occurs in the postings (favourable)
(dict) william -> (postings) {(2.author,2.title), 3.author, 4.title}
The second approach is favourable because it allows for weighted zone scoring.
6.1.1 Weighted Zone Scoring
Method
- Consider a pair $(q, d)$ where $q$ is some Boolean query and $d$ is some document within a collection. Let each document in the collection have $l$ zones.
- Let $z_i$ be the $i$-th zone of document $d$
- Let $g_1, \dots, g_l \in [0,1]$ such that $\sum_{i=1}^{l} g_i=1$.
- Each zone $z_i$ will have a Boolean score $s_i$ denoting a match with $q$. This match is based on some Boolean function mapping the presence of query terms in a zone to either $0$ or $1$.
- Then, the weighted zone score for the document $d$ is $\sum^{l}_{i=1}{g_i s_i}$
Example Implementation
ZONESCORE(q1, q2)
float scores[N] = [0] // array with score entry for each doc, initialised to 0
constant g[l] // contains the respective zone weights
p1 <- postings(q1)
p2 <- postings(q2)
// p1 and p2 are initialised to point to the beginning of their postings
while p1 != NIL and p2 != NIL
do if docID(p1) = docID(p2)
then scores[docID(p1)] <- WEIGHTEDZONE(p1, p2, g)
p1 <- next(p1)
p2 <- next(p2)
else if docID(p1) < docID(p2)
then p1 <- next(p1)
else p2 <- next(p2)
return scores
In this implementation, the query is a two-term query with query terms
q1andq2, and the Boolean function isAND: 1ifq1andq2are in a zone, and0otherwise.
WEIGHTEDZONEfunction is assumed to calculate the weighted zone score based on postings and weight.