xapian-core  1.4.27
Public Member Functions | List of all members
Xapian::Internal::Bo1EWeight Class Reference

This class implements the Bo1 scheme for query expansion. More...

#include <expandweight.h>

+ Inheritance diagram for Xapian::Internal::Bo1EWeight:
+ Collaboration diagram for Xapian::Internal::Bo1EWeight:

Public Member Functions

 Bo1EWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_)
 Constructor. More...
 
double get_weight () const
 Calculate the weight. More...
 
- Public Member Functions inherited from Xapian::Internal::ExpandWeight
 ExpandWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_, bool want_collection_freq_)
 Constructor. More...
 
 ExpandWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_, bool want_collection_freq_, double expand_k_)
 Constructor. More...
 
void collect_stats (TermList *merger, const std::string &term)
 Get the term statistics. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Xapian::Internal::ExpandWeight
double get_avlen () const
 Return the average length of the database. More...
 
Xapian::doccount get_rsize () const
 Return the number of documents in the RSet. More...
 
Xapian::termcount get_collection_freq () const
 Return the collection frequency of the term. More...
 
Xapian::totallength get_collection_len () const
 Return the length of the collection. More...
 
Xapian::doccount get_dbsize () const
 Return the size of the database. More...
 
- Protected Attributes inherited from Xapian::Internal::ExpandWeight
ExpandStats stats
 An ExpandStats object to accumulate statistics. More...
 

Detailed Description

This class implements the Bo1 scheme for query expansion.

Bo1 is a representative scheme of the Divergence from Randomness Framework by Gianni Amati.

This is a parameter free weighting scheme for query expansion and it uses the Bose-Einstein probabilistic distribution.

For more information about the DFR Framework and the Bo1 scheme, please refer to Gianni Amati's PHD thesis.

Definition at line 255 of file expandweight.h.

Constructor & Destructor Documentation

◆ Bo1EWeight()

Xapian::Internal::Bo1EWeight::Bo1EWeight ( const Xapian::Database db_,
Xapian::doccount  rsize_,
bool  use_exact_termfreq_ 
)
inline

Constructor.

Parameters
db_The database.
rsize_The number of documents in the RSet.
use_exact_termfreq_When expanding over a combined database, should we use the exact termfreq (if false a cheaper approximation is used).

All the parameters are passed to the parent ExpandWeight object.

Definition at line 267 of file expandweight.h.

Member Function Documentation

◆ get_weight()

double Xapian::Internal::Bo1EWeight::get_weight ( ) const
virtual

Calculate the weight.

Implements Xapian::Internal::ExpandWeight.

Definition at line 33 of file bo1eweight.cc.

References log2().


The documentation for this class was generated from the following files: