UOM-cpp // Typo fix.
This commit is contained in:
parent
1d8e1e4af7
commit
ef2b47eabb
|
@ -34,7 +34,7 @@ namespace vChewing
|
||||||
{
|
{
|
||||||
|
|
||||||
// About 20 generations.
|
// About 20 generations.
|
||||||
static const double DecayThreshould = 1.0 / 1048576.0;
|
static const double DecayThreshold = 1.0 / 1048576.0;
|
||||||
|
|
||||||
static double Score(size_t eventCount, size_t totalCount, double eventTimestamp, double timestamp, double lambda);
|
static double Score(size_t eventCount, size_t totalCount, double eventTimestamp, double timestamp, double lambda);
|
||||||
static bool IsEndingPunctuation(const std::string &value);
|
static bool IsEndingPunctuation(const std::string &value);
|
||||||
|
@ -126,7 +126,7 @@ void UserOverrideModel::Observation::update(const std::string &candidate, double
|
||||||
static double Score(size_t eventCount, size_t totalCount, double eventTimestamp, double timestamp, double lambda)
|
static double Score(size_t eventCount, size_t totalCount, double eventTimestamp, double timestamp, double lambda)
|
||||||
{
|
{
|
||||||
double decay = exp((timestamp - eventTimestamp) * lambda);
|
double decay = exp((timestamp - eventTimestamp) * lambda);
|
||||||
if (decay < DecayThreshould)
|
if (decay < DecayThreshold)
|
||||||
{
|
{
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue