mosesdecoder/moses/FF/StatelessFeatureFunction.cpp
Ulrich Germann e4f5c69109 One step closer to eliminating the requirement to provide num-features=... in the config file.
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.
2015-04-29 20:16:52 +01:00

24 lines
511 B
C++

#include "StatelessFeatureFunction.h"
namespace Moses
{
std::vector<const StatelessFeatureFunction*> StatelessFeatureFunction::m_statelessFFs;
StatelessFeatureFunction
::StatelessFeatureFunction(const std::string &line, bool registerNow)
: FeatureFunction(line, registerNow)
{
m_statelessFFs.push_back(this);
}
StatelessFeatureFunction
::StatelessFeatureFunction(size_t numScoreComponents, const std::string &line)
: FeatureFunction(numScoreComponents, line)
{
m_statelessFFs.push_back(this);
}
}