mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-16 23:10:31 +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
511 B
C++
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);
|
|
}
|
|
|
|
}
|
|
|