ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Public Attributes | List of all members
meta::index::score_data Struct Reference

A score_data object contains information needed to evaluate a ranking function. More...

#include <score_data.h>

Public Member Functions

 score_data (inverted_index &p_idx, float p_avg_dl, uint64_t p_num_docs, uint64_t p_total_terms, float p_query_length)
 Constructor to initialize most elements. More...
 

Public Attributes

inverted_indexidx
 index queries are running on
 
float avg_dl
 average document length
 
uint64_t num_docs
 total number of documents
 
uint64_t total_terms
 total number of terms in the index
 
float query_length
 the total length of the query (sum of all term weights)
 
term_id t_id
 doc term id
 
float query_term_weight
 query term count (or weight in case of feedback)
 
uint64_t doc_count
 number of docs that t_id appears in
 
uint64_t corpus_term_count
 number of times t_id appears in corpus
 
doc_id d_id
 document id
 
uint64_t doc_term_count
 number of times the term appears in the current doc
 
uint64_t doc_size
 total number of terms in the doc
 
uint64_t doc_unique_terms
 number of unique terms in the doc
 

Detailed Description

A score_data object contains information needed to evaluate a ranking function.

Data is set by the base ranker class as needed, so the derived ranking classes don't make many unncessary calls to the inverted index.

Constructor & Destructor Documentation

§ score_data()

meta::index::score_data::score_data ( inverted_index p_idx,
float  p_avg_dl,
uint64_t  p_num_docs,
uint64_t  p_total_terms,
float  p_query_length 
)
inline

Constructor to initialize most elements.

Parameters
p_idxThe index that is being used
p_avg_dlThe average doc length in the index
p_num_docsThe number of docs in the index
p_total_termsThe total number of terms in the index
p_query_lengthThe current query length (e.g. the total number of words in the query)

The documentation for this struct was generated from the following file: