mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-11-09 16:04:41 +03:00
change create-ini to give implementation independent names to LM
This commit is contained in:
parent
2c26ad133e
commit
96b43c2ded
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user