compiles on gcc 4.6.3

This commit is contained in:
Hieu Hoang 2014-09-02 23:27:16 +01:00
parent b6428f412b
commit 02b11bfd6d
2 changed files with 14 additions and 7 deletions

View File

@ -20,6 +20,12 @@ int BilingualLMState::Compare(const FFState& other) const
////////////////////////////////////////////////////////////////
BilingualLM::BilingualLM(const std::string &line)
:StatefulFeatureFunction(1, line)
,premultiply(true)
,factored(false)
,neuralLM_cache(1000000)
,word_factortype(0)
,BOS_word(BOS_word_actual)
,EOS_word(EOS_word_actual)
{
ReadParameters();
FactorCollection& factorFactory = FactorCollection::Instance(); //Factor Factory to use for BOS_ and EOS_

View File

@ -23,10 +23,11 @@ namespace Moses
class BilingualLMState : public FFState
{
size_t m_hash;
int first_word_index = 0; //Doesn't matter for phrase based.
int first_word_index; //Doesn't matter for phrase based.
public:
BilingualLMState(size_t hash)
:m_hash(hash)
,first_word_index(0)
{}
BilingualLMState(size_t hash, int word_index)
:m_hash(hash), first_word_index(word_index)
@ -79,20 +80,20 @@ protected:
int m_nGramOrder;
int target_ngrams;
int source_ngrams;
bool premultiply = true;
bool factored = false;
int neuralLM_cache = 1000000;
bool premultiply;
bool factored;
int neuralLM_cache;
int unknown_word_id;
//NeuralLM lookup
FactorType word_factortype = 0;
FactorType word_factortype;
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 = BOS_word_actual;
const Word& EOS_word = EOS_word_actual;
const Word& BOS_word;
const Word& EOS_word;
// thread-specific nplm for thread-safety
mutable boost::thread_specific_ptr<nplm::neuralLM> m_neuralLM;