convert all other weight-* to [weight]

This commit is contained in:
Hieu Hoang 2012-12-06 16:19:18 +00:00
parent af459277b8
commit e3def0bc78
5 changed files with 13 additions and 5 deletions

View File

@ -13,7 +13,7 @@ LexicalReordering::LexicalReordering(std::vector<FactorType>& f_factors,
const LexicalReorderingConfiguration& configuration,
const std::string &filePath,
const std::vector<float>& weights)
: StatefulFeatureFunction("LexicalReordering_" + configuration.GetModelString(),
: StatefulFeatureFunction("LexicalReordering",
configuration.GetNumScoreComponents()),
m_configuration(configuration)
{

View File

@ -374,9 +374,17 @@ void Parameter::ConvertWeightArgs()
ConvertWeightArgs("weight-l", "LM");
ConvertWeightArgs("weight-slm", "SyntacticLM");
ConvertWeightArgs("weight-u", "UnknownWordPenalty");
ConvertWeightArgs("weight-lex", "GlobalLexicalReordering");
ConvertWeightArgs("weight-generation", "Generation");
ConvertWeightArgs("weight-lr", "LexicalReordering");
ConvertWeightArgs("weight-lr", "BleuScoreFeature");
ConvertWeightArgs("weight-glm", "GlobalLexicalModel");
ConvertWeightArgs("weight-wt", "WordTranslationFeature");
ConvertWeightArgs("weight-pp", "PhrasePairFeature");
ConvertWeightArgs("weight-pb", "PhraseBoundaryFeature");
ConvertWeightArgs("weight-e", "WordDeletion"); // TODO Can't find real name
ConvertWeightArgs("weight-dlm", "DiscriminativeLM"); // TODO Can't find real name
ConvertWeightArgs("weight-lex", "GlobalLexicalReordering"); // TODO Can't find real name
// distortion / lex distortion
PARAM_VEC &newWeights = m_setting["weight"];

View File

@ -17,7 +17,7 @@ int PhraseBoundaryState::Compare(const FFState& other) const
PhraseBoundaryFeature::PhraseBoundaryFeature
(const FactorList& sourceFactors, const FactorList& targetFactors) :
StatefulFeatureFunction("pb", ScoreProducer::unlimited), m_sourceFactors(sourceFactors),
StatefulFeatureFunction("PhraseBoundaryFeature", ScoreProducer::unlimited), m_sourceFactors(sourceFactors),
m_targetFactors(targetFactors), m_sparseProducerWeight(1)
{
}

View File

@ -33,7 +33,7 @@ class PhrasePairFeature: public StatelessFeatureFunction {
public:
PhrasePairFeature (FactorType sourceFactorId, FactorType targetFactorId,
bool simple, bool sourceContext, bool ignorePunctuation, bool domainTrigger) :
StatelessFeatureFunction("pp", ScoreProducer::unlimited),
StatelessFeatureFunction("PhrasePairFeature", ScoreProducer::unlimited),
m_sourceFactorId(sourceFactorId),
m_targetFactorId(targetFactorId),
m_unrestricted(true),

View File

@ -39,7 +39,7 @@ public:
WordTranslationFeature(FactorType factorTypeSource, FactorType factorTypeTarget,
bool simple, bool sourceContext, bool targetContext, bool ignorePunctuation,
bool domainTrigger):
StatelessFeatureFunction("wt", ScoreProducer::unlimited),
StatelessFeatureFunction("WordTranslationFeature", ScoreProducer::unlimited),
m_factorTypeSource(factorTypeSource),
m_factorTypeTarget(factorTypeTarget),
m_unrestricted(true),