In the document retrieval problem (Muthukrishnan, 2002) , we are given a collection of documents (strings) of total length D in advance, and our target is to create an index for these documents such that for any subsequent input pattern P , we can identify which documents in the collection contain P . In this paper, we study a natural extension to the above document retrieval problem. We call this top-k frequent document retrieval, where instead of listing all documents containing P , our focus is to identify the top-k documents having most occurrences of P . This problem forms a basis for search engine tasks of retrieving documents ranked with TFIDF (Term Frequency-Inverse Document Frequency) metric. A related problem was studied by Muthukrishnan (2002) where the emphasis was on retrieving all the documents whose number of occurrences of the pattern P exceeds some frequency threshold f . However, from the information retrieval point of view, it is hard for a user to specify such a threshold value f and have a sense of how many documents will be reported as the output. We develop some additional building blocks which help the user overcome this limitation. These are used to derive an efficient index for top-k frequent document retrieval problem, answering queries in O (|P | + log D log log D +k) time and taking O (D log D) space. Our approach is based on a new use of the suffix tree called induced generalized suffix tree (IGST). The practicality of the proposed index is validated by the experimental results.
An O(n log n) words index has been proposed in REF with O(p + log |D| log log |D|+ k) query time.
Efficient index for retrieving top-k most frequent documents
J. Discrete Algorithms
J. Discrete Algorithms
Computer Science