ModErn Text Analysis
META Enumerates Textual Applications
|
The pivoted document length normalization ranking function. More...
#include <pivoted_length.h>
Public Member Functions | |
pivoted_length (double s=default_s) | |
double | score_one (const score_data &sd) override |
Public Member Functions inherited from meta::index::ranker | |
std::vector< std::pair< doc_id, double > > | score (inverted_index &idx, corpus::document &query, uint64_t num_results=10, const std::function< bool(doc_id d_id)> &filter=[](doc_id){return true;}) |
virtual double | initial_score (const score_data &sd) const |
Computes the constant contribution to the score of a particular document. More... | |
virtual | ~ranker ()=default |
Default destructor. | |
Static Public Attributes | |
static const std::string | id = "pivoted-length" |
Identifier for this ranker. | |
static const constexpr double | default_s = 0.20 |
Default value of s parameter. | |
Private Attributes | |
const double | s_ |
s parameter for pivoted_length normalization | |
The pivoted document length normalization ranking function.
meta::index::pivoted_length::pivoted_length | ( | double | s = default_s | ) |
s |
|
overridevirtual |
sd | the score_data for this query |
Implements meta::index::ranker.