the number of scores must be set in the feature function constructor, there's no functionality to change it once its set
You might be better off using sparse features if you don't know how many scores you have at construction time On 14/06/14 09:17, Marcin Junczys-Dowmunt wrote: > Hi, > what's the trick for defining a feature function with a variable number > of scores based on custom parameters in the ini-file? > Just setting m_numScoreComponents = 2 in SetParameter(...) doesn't work. > It seems the number of features is registered somewhere on object > creation as I get the followiing message: > > Exception: moses/ScoreComponentCollection.cpp:242 in void > Moses::ScoreComponentCollection::Assign(const Moses::FeatureFunction*, > const std::vector<float>&) threw util::Exception'. > Feature function EditOps0 specified 1 dense scores or weights. Actually > has 2 > > Thanks, > Marcin > > > _______________________________________________ > Moses-support mailing list > [email protected] > http://mailman.mit.edu/mailman/listinfo/moses-support > _______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
