Exercise 1.2
Consider these documents:
Doc 1 breakthrough drug for schizophrenia
Doc 2 new schizophrenia drug
Doc 3 new approach for treatment of schizophrenia
Doc 4 new hopes for schizophrenia patients
a. Draw the term-document incidence matrix for this document collection
b. Drawthe inverted index representation for this collection
Jawab:
Exercise 1.7
Recommend a query processing order for
d. (tangerine OR trees) AND (marmalade OR skies) AND (kaleidoscope OR eyes)
given the following postings list sizes:
Jawab:
(tangerine OR trees) AND (marmalade OR skies) AND (kaleidoscope OR eyes)
Hasilè trees AND skies AND eyes
Exercise 1.10
Write out a postingsmerge algorithm, in the style of Figure 1.6 (page 11), for an x OR y
query.
Jawab:
INTERSECT(X,Y)
answer <– ( )
while X != NIL or Y != NIL
do if docID (X) = docID (Y)
then ADD(answer,docID(X))
X <– next (X)
Y <– next (Y)
else if docID (X) <>
then X <– next (X)
else Y <– next (Y)
return answer
Perbandingan Query Boolean Google dengan Yahoo
Google: query yang dimasukkan badminton
Yahoo: query yang dimasukkan badminton
Jika dilihat dari Query yang dimasukkan maka dapat dilihat bahwa hasil yang ditampilkan oleh Google lebih banyak mendekati apa yang kita inginkan daripada hasil yang ditampilkan oleh Yahoo.






















































