mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-17 07:20:48 +03:00
Some FF (Mmsapt, LexicalReordering, Many single-value FF) provide this number during "registration"; when missing, a default weight vector of uniform 1.0 is automatically generated. This eliminates the need for the user to figure out what the exact number of features is for each FF, which can get complicated, e.g. in the case of Mmsapt/PhraseDictionaryBitextSampling.
24 lines
502 B
C++
24 lines
502 B
C++
#include "StatefulFeatureFunction.h"
|
|
|
|
namespace Moses
|
|
{
|
|
|
|
std::vector<const StatefulFeatureFunction*> StatefulFeatureFunction::m_statefulFFs;
|
|
|
|
StatefulFeatureFunction
|
|
::StatefulFeatureFunction(const std::string &line, bool registerNow)
|
|
: FeatureFunction(line, registerNow)
|
|
{
|
|
m_statefulFFs.push_back(this);
|
|
}
|
|
|
|
StatefulFeatureFunction
|
|
::StatefulFeatureFunction(size_t numScoreComponents, const std::string &line)
|
|
: FeatureFunction(numScoreComponents, line)
|
|
{
|
|
m_statefulFFs.push_back(this);
|
|
}
|
|
|
|
}
|
|
|