mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-11-13 00:59:02 +03:00
convert all other weight-* to [weight]
This commit is contained in:
parent
af459277b8
commit
e3def0bc78
@ -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)
|
||||
{
|
||||
|
@ -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"];
|
||||
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user