mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-17 07:20:48 +03:00
FeatureFunction: enable construction without registering
This commit is contained in:
parent
3288eb5f50
commit
0dd6c31f63
@ -57,9 +57,7 @@ FeatureFunction(const std::string& line, bool registerNow)
|
||||
if (registerNow) Register();
|
||||
}
|
||||
|
||||
FeatureFunction::
|
||||
FeatureFunction(size_t numScoreComponents,
|
||||
const std::string& line)
|
||||
FeatureFunction::FeatureFunction(size_t numScoreComponents, const std::string& line, bool registerNow)
|
||||
: m_tuneable(true)
|
||||
, m_requireSortingAfterSourceContext(false)
|
||||
, m_verbosity(std::numeric_limits<std::size_t>::max())
|
||||
@ -68,7 +66,7 @@ FeatureFunction(size_t numScoreComponents,
|
||||
{
|
||||
m_numTuneableComponents = m_numScoreComponents;
|
||||
ParseLine(line);
|
||||
Register();
|
||||
if (registerNow) Register();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -62,8 +62,8 @@ public:
|
||||
static FeatureFunction &FindFeatureFunction(const std::string& name);
|
||||
static void Destroy();
|
||||
|
||||
FeatureFunction(const std::string &line, bool initializeNow);
|
||||
FeatureFunction(size_t numScoreComponents, const std::string &line);
|
||||
FeatureFunction(const std::string &line, bool registerNow);
|
||||
FeatureFunction(size_t numScoreComponents, const std::string &line, bool registerNow = true);
|
||||
virtual bool IsStateless() const = 0;
|
||||
virtual ~FeatureFunction();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user