ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
index
ranker
absolute_discount.h
Go to the documentation of this file.
1
10
#ifndef META_ABSOLUTE_DISCOUNT_H_
11
#define META_ABSOLUTE_DISCOUNT_H_
12
13
#include "
index/ranker/lm_ranker.h
"
14
#include "
index/ranker/ranker_factory.h
"
15
16
namespace
meta
17
{
18
namespace
index
19
{
20
24
class
absolute_discount
:
public
language_model_ranker
25
{
26
public
:
30
const
static
std::string
id
;
31
35
absolute_discount
(
double
delta = 0.7);
36
41
double
smoothed_prob
(
const
score_data
& sd)
const override
;
42
47
double
doc_constant
(
const
score_data
& sd)
const override
;
48
49
private
:
51
const
double
delta_
;
52
};
53
58
template
<>
59
std::unique_ptr<ranker>
make_ranker<absolute_discount>
(
const
cpptoml::table&);
60
}
61
}
62
#endif
meta::index::absolute_discount::absolute_discount
absolute_discount(double delta=0.7)
Definition:
absolute_discount.cpp:18
meta::index::make_ranker< absolute_discount >
std::unique_ptr< ranker > make_ranker< absolute_discount >(const cpptoml::table &)
Specialization of the factory method used to create absolute_discount rankers.
Definition:
absolute_discount.cpp:39
ranker_factory.h
lm_ranker.h
meta::index::absolute_discount::doc_constant
double doc_constant(const score_data &sd) const override
A document-dependent constant.
Definition:
absolute_discount.cpp:31
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::language_model_ranker
Scores documents according to one of three different smoothed language model scoring methods describe...
Definition:
lm_ranker.h:24
meta::index::absolute_discount::delta_
const double delta_
the absolute discounting parameter
Definition:
absolute_discount.h:51
meta::index::score_data
A score_data object contains information needed to evaluate a ranking function.
Definition:
score_data.h:39
meta::index::absolute_discount
Implements the absolute discounting smoothing method.
Definition:
absolute_discount.h:24
meta::index::absolute_discount::id
static const std::string id
The identifier of this ranker.
Definition:
absolute_discount.h:30
meta::index::absolute_discount::smoothed_prob
double smoothed_prob(const score_data &sd) const override
Calculates the smoothed probability of a term.
Definition:
absolute_discount.cpp:23
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1