Remove unnecessary const gimmicks

This commit is contained in:
XapaJIaMnu 2014-10-16 12:36:19 +01:00
parent bb06091713
commit 74e90343d6
2 changed files with 5 additions and 9 deletions

View File

@ -18,14 +18,12 @@ int BilingualLMState::Compare(const FFState& other) const
////////////////////////////////////////////////////////////////
BilingualLM::BilingualLM(const std::string &line)
: StatefulFeatureFunction(1, line),
word_factortype(0),
BOS_word(BOS_word_actual),
EOS_word(EOS_word_actual) {
word_factortype(0) {
FactorCollection& factorFactory = FactorCollection::Instance(); //Factor Factory to use for BOS_ and EOS_
BOS_factor = factorFactory.AddFactor(BOS_);
BOS_word_actual.SetFactor(0, BOS_factor);
BOS_word.SetFactor(0, BOS_factor);
EOS_factor = factorFactory.AddFactor(EOS_);
EOS_word_actual.SetFactor(0, EOS_factor);
EOS_word.SetFactor(0, EOS_factor);
}

View File

@ -96,10 +96,8 @@ protected:
FactorType pos_factortype;
const Factor* BOS_factor;
const Factor* EOS_factor;
mutable Word BOS_word_actual;
mutable Word EOS_word_actual;
const Word& BOS_word;
const Word& EOS_word;
mutable Word BOS_word;
mutable Word EOS_word;
public:
BilingualLM(const std::string &line);