This commit is contained in:
Nicola Bertoldi 2014-03-13 19:41:40 +01:00
parent 8d9bf2405d
commit 03825e3ffd
2 changed files with 15 additions and 1 deletions

View File

@ -590,13 +590,15 @@ int main(int argc, char** argv)
exit(1);
}
std::cerr <<"Before StaticData::LoadDataStatic" << std::endl;
// initialize all "global" variables, which are stored in StaticData
// note: this also loads models such as the language model, etc.
if (!StaticData::LoadDataStatic(&params, argv[0])) {
exit(1);
}
std::cerr <<"After StaticData::LoadDataStatic" << std::endl;
std::cerr <<"Before ShowWeights" << std::endl;
// setting "-show-weights" -> just dump out weights and exit
if (params.isParamSpecified("show-weights")) {
ShowWeights();

View File

@ -534,7 +534,19 @@ bool StaticData::LoadData(Parameter *parameter)
NoCache();
OverrideFeatures();
std::cerr <<"After StaticData::LoadDataStatic" << std::endl;
std::cerr <<"Before ShowWeights" << std::endl;
// setting "-show-weights" -> just dump out weights and exit
if (params.isParamSpecified("show-weights")) {
MosesCmd::ShowWeights();
exit(0);
}
std::cerr <<"After ShowWeights" << std::endl;
std::cerr <<"Before LoadFeatureFunctions" << std::endl;
LoadFeatureFunctions();
std::cerr <<"After LoadFeatureFunctions" << std::endl;
if (!LoadDecodeGraphs()) return false;