ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
index
ranker
okapi_bm25.h
Go to the documentation of this file.
1
9
#ifndef META_OKAPI_BM25_H_
10
#define META_OKAPI_BM25_H_
11
12
#include "
index/ranker/ranker.h
"
13
#include "
index/ranker/ranker_factory.h
"
14
15
namespace
meta
16
{
17
namespace
index
18
{
19
23
class
okapi_bm25
:
public
ranker
24
{
25
public
:
27
const
static
std::string
id
;
28
30
const
static
constexpr
double
default_k1
= 1.2;
31
33
const
static
constexpr
double
default_b
= 0.75;
34
36
const
static
constexpr
double
default_k3
= 500.0;
37
43
okapi_bm25
(
double
k1 = default_k1,
double
b = default_b,
44
double
k3 = default_k3);
45
49
double
score_one
(
const
score_data
& sd)
override
;
50
51
private
:
53
const
double
k1_
;
55
const
double
b_
;
57
const
double
k3_
;
58
};
59
63
template
<>
64
std::unique_ptr<ranker>
make_ranker<okapi_bm25>
(
const
cpptoml::table&);
65
}
66
}
67
#endif
ranker.h
meta::index::okapi_bm25::b_
const double b_
Length normalization.
Definition:
okapi_bm25.h:55
meta::index::okapi_bm25::k3_
const double k3_
Query term smoothing.
Definition:
okapi_bm25.h:57
meta::index::ranker
A ranker scores a query against all the documents in an inverted index, returning a list of documents...
Definition:
ranker.h:41
ranker_factory.h
meta::index::okapi_bm25::default_k1
static const constexpr double default_k1
Default k1, doc term smoothing.
Definition:
okapi_bm25.h:30
meta::index::okapi_bm25::default_b
static const constexpr double default_b
Default b, length normalization.
Definition:
okapi_bm25.h:33
meta::index::okapi_bm25::okapi_bm25
okapi_bm25(double k1=default_k1, double b=default_b, double k3=default_k3)
Definition:
okapi_bm25.cpp:18
meta::index::okapi_bm25::default_k3
static const constexpr double default_k3
Default k3, query term smoothing.
Definition:
okapi_bm25.h:36
meta::index::make_ranker< okapi_bm25 >
std::unique_ptr< ranker > make_ranker< okapi_bm25 >(const cpptoml::table &)
Specialization of the factory method used to create okapi_bm25 rankers.
Definition:
okapi_bm25.cpp:42
meta
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition:
analyzer.h:24
meta::index::okapi_bm25
The Okapi BM25 scoring function.
Definition:
okapi_bm25.h:23
meta::index::okapi_bm25::id
static const std::string id
The identifier for this ranker.
Definition:
okapi_bm25.h:27
meta::index::score_data
A score_data object contains information needed to evaluate a ranking function.
Definition:
score_data.h:39
meta::index::okapi_bm25::k1_
const double k1_
Doc term smoothing.
Definition:
okapi_bm25.h:53
meta::index::okapi_bm25::score_one
double score_one(const score_data &sd) override
Definition:
okapi_bm25.cpp:23
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1