mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
bug fix with interaction of alternate weights and xml markup
This commit is contained in:
parent
dab6a301fa
commit
6824d84491
@ -121,6 +121,7 @@ int Sentence::Read(std::istream& in,const std::vector<FactorType>& factorOrder)
|
||||
if (meta.find("weight-setting") != meta.end()) {
|
||||
this->SetWeightSetting(meta["weight-setting"]);
|
||||
this->SetSpecifiesWeightSetting(true);
|
||||
staticData.SetWeightSetting(meta["weight-setting"]);
|
||||
} else {
|
||||
this->SetSpecifiesWeightSetting(false);
|
||||
}
|
||||
|
@ -141,10 +141,12 @@ void TargetPhrase::Evaluate(const Phrase &source, const std::vector<FeatureFunct
|
||||
void TargetPhrase::Evaluate(const InputType &input, const InputPath &inputPath)
|
||||
{
|
||||
const std::vector<FeatureFunction*> &ffs = FeatureFunction::GetFeatureFunctions();
|
||||
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
for (size_t i = 0; i < ffs.size(); ++i) {
|
||||
const FeatureFunction &ff = *ffs[i];
|
||||
ff.Evaluate(input, inputPath, *this, m_scoreBreakdown);
|
||||
if (! staticData.IsFeatureFunctionIgnored( ff )) {
|
||||
ff.Evaluate(input, inputPath, *this, m_scoreBreakdown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user