|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
DocumentIteratorVisitor | A visitor for the tree defined by a DocumentIterator . |
Class Summary | |
---|---|
AbstractDocumentIteratorVisitor | An abstract implementation of a DocumentIteratorVisitor
that does nothing and always returns true when visiting internal nodes. |
CounterCollectionVisitor | A visitor collecting the counts of terms in a DocumentIterator
tree. |
CounterSetupVisitor | A visitor using the information collected by a
TermCollectionVisitor
to set up term frequencies and counters. |
TermCollectionVisitor | A visitor collecting information about terms appearing
in a DocumentIterator . |
Visitors for composite document iterators.
A DocumentIterator
(in particular, those provided by MG4J in the package it.unimi.dsi.mg4j.search
)
is usually structured as a composite,
with operators as internal nodes and IndexIterator
s
as leaves. A composite can be explored using a visitor: thus,
the DocumentIterator
interface provides two methods,
accept(DocumentIteratorVisitor)
and
acceptOnTruePaths(DocumentIteratorVisitor)
,
that let a DocumentIteratorVisitor
visit the composite structure.
A DocumentIteratorVisitor
provides methods
for visiting in preorder
and in postorder all internal nodes.
Leaves have a single visit method instead. Note that a DocumentIteratorVisitor
must be (re)usable after each call
to prepare()
.
The abstract class AbstractDocumentIteratorVisitor
provides
stubs implementing internal visits and prepare()
as no-ops.
An example of the utility of visitors for document iterators is given by term counting:
using a number of coordinated visitors, it is possible to compute
a count for each term appearing in a (no matter how complex) query. The count can be used as
an input for counting-based scoring schemes, such as BM25 or cosine-based measures. For more information,
please read the documentation of CounterCollectionVisitor
.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |