mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
beautify
This commit is contained in:
parent
3b76143072
commit
21ff6d4831
@ -89,8 +89,7 @@ void Manager::ProcessSentence()
|
||||
std::cerr << "sentence specifies weight setting\n";
|
||||
std::cerr << "calling SetWeightSetting( " << m_source.GetWeightSetting() << ")\n";
|
||||
StaticData::Instance().SetWeightSetting(m_source.GetWeightSetting());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
StaticData::Instance().SetWeightSetting("default");
|
||||
}
|
||||
}
|
||||
|
@ -113,8 +113,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);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this->SetSpecifiesWeightSetting(false);
|
||||
}
|
||||
|
||||
|
@ -1150,8 +1150,7 @@ void StaticData::LoadFeatureFunctions()
|
||||
PhraseDictionary *pt = dynamic_cast<PhraseDictionary*>(ff);
|
||||
if (pt) {
|
||||
m_phraseDictionary.push_back(pt);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// load phrase table last. They can depend on other features
|
||||
ff->Load();
|
||||
}
|
||||
@ -1194,7 +1193,8 @@ bool StaticData::CheckWeights() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void StaticData::ProcessAlternateWeightSettings() {
|
||||
void StaticData::ProcessAlternateWeightSettings()
|
||||
{
|
||||
const vector<string> &weightSpecification = m_parameter->GetParam("alternate-weight-setting");
|
||||
|
||||
// get mapping from feature names to feature functions
|
||||
@ -1250,8 +1250,7 @@ void StaticData::ProcessAlternateWeightSettings() {
|
||||
if (ffLookUp == nameToFF.end()) {
|
||||
cerr << "ERROR: alternate weight setting " << currentId << " specifies weight(s) for " << name << " but there is no such feature function" << endl;
|
||||
hasErrors = true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
m_weightSetting[ currentId ]->Assign( nameToFF[name], weights);
|
||||
}
|
||||
}
|
||||
|
@ -17,14 +17,11 @@ PhraseDictionaryDynSuffixArray::PhraseDictionaryDynSuffixArray(const std::string
|
||||
const vector<string> &args = m_args[i];
|
||||
if (args[0] == "source") {
|
||||
m_source = args[1];
|
||||
}
|
||||
else if (args[0] == "target") {
|
||||
} else if (args[0] == "target") {
|
||||
m_target = args[1];
|
||||
}
|
||||
else if (args[0] == "alignment") {
|
||||
} else if (args[0] == "alignment") {
|
||||
m_alignments = args[1];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
//throw "Unknown argument " + args[0];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user