diff --git a/misc/create-ini/LM.cpp b/misc/create-ini/LM.cpp index 50759b47c..e51f3b22e 100644 --- a/misc/create-ini/LM.cpp +++ b/misc/create-ini/LM.cpp @@ -2,3 +2,22 @@ int LM::s_index = 0; +void LM::Output(std::ostream &out) const +{ + out << name + << " name=LM" << index + << " order=" << order + << " factor=" << OutputFactors(outFactors) + << " path=" << path + << " " << otherArgs + << std::endl; +} + +void LM::OutputWeights(std::ostream &out) const +{ + out << "LM" << index << "= "; + for (size_t i = 0; i < numFeatures; ++i) { + out << GetWeight() << " "; + } + out << std::endl; +} diff --git a/misc/create-ini/LM.h b/misc/create-ini/LM.h index 429835898..fb78540e6 100644 --- a/misc/create-ini/LM.h +++ b/misc/create-ini/LM.h @@ -13,15 +13,8 @@ class LM : public FF float GetWeight() const { return 0.5; } - void Output(std::ostream &out) const - { - out << name - << " order=" << order - << " factor=" << OutputFactors(outFactors) - << " path=" << path - << " " << otherArgs - << std::endl; - } + void Output(std::ostream &out) const; + void OutputWeights(std::ostream &out) const; public: std::string otherArgs;