diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-10 06:17:36 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-11 04:09:22 +0300 |
commit | 29694af6e43c1cec7a6fd0b157eb44faca706129 (patch) | |
tree | acda250a83c5a3a4244be011f1f4b9e6337f5d6b /moses/LM | |
parent | 240b88c6834c9c94e8a6448a34dc4ad33bdf3fbd (diff) |
Code cleanup and refactoring.
Diffstat (limited to 'moses/LM')
-rw-r--r-- | moses/LM/BilingualLM.cpp | 3 | ||||
-rw-r--r-- | moses/LM/BilingualLM.h | 2 | ||||
-rw-r--r-- | moses/LM/DALMWrapper.h | 2 | ||||
-rw-r--r-- | moses/LM/IRST.cpp | 2 | ||||
-rw-r--r-- | moses/LM/IRST.h | 2 | ||||
-rw-r--r-- | moses/LM/MaxEntSRI.h | 2 | ||||
-rw-r--r-- | moses/LM/NeuralLMWrapper.h | 2 | ||||
-rw-r--r-- | moses/LM/RDLM.h | 2 | ||||
-rw-r--r-- | moses/LM/Rand.h | 2 | ||||
-rw-r--r-- | moses/LM/SRI.h | 2 | ||||
-rw-r--r-- | moses/LM/oxlm/OxLM.h | 2 |
11 files changed, 12 insertions, 11 deletions
diff --git a/moses/LM/BilingualLM.cpp b/moses/LM/BilingualLM.cpp index bcc4580a6..8fc88c597 100644 --- a/moses/LM/BilingualLM.cpp +++ b/moses/LM/BilingualLM.cpp @@ -20,8 +20,9 @@ BilingualLM::BilingualLM(const std::string &line) } -void BilingualLM::Load(AllOptions const& opts) +void BilingualLM::Load(AllOptions::ptr const& opts) { + m_options = opts; ReadParameters(); loadModel(); } diff --git a/moses/LM/BilingualLM.h b/moses/LM/BilingualLM.h index dd824a643..ed9d99489 100644 --- a/moses/LM/BilingualLM.h +++ b/moses/LM/BilingualLM.h @@ -117,7 +117,7 @@ public: return new BilingualLMState(0); } - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); FFState* EvaluateWhenApplied( const Hypothesis& cur_hypo, diff --git a/moses/LM/DALMWrapper.h b/moses/LM/DALMWrapper.h index b296d17d4..4898dd66c 100644 --- a/moses/LM/DALMWrapper.h +++ b/moses/LM/DALMWrapper.h @@ -28,7 +28,7 @@ public: LanguageModelDALM(const std::string &line); virtual ~LanguageModelDALM(); - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); virtual const FFState *EmptyHypothesisState(const InputType &/*input*/) const; diff --git a/moses/LM/IRST.cpp b/moses/LM/IRST.cpp index 9823b4039..10fcdcd9f 100644 --- a/moses/LM/IRST.cpp +++ b/moses/LM/IRST.cpp @@ -96,7 +96,7 @@ bool LanguageModelIRST::IsUseable(const FactorMask &mask) const return ret; } -void LanguageModelIRST::Load(AllOptions const& opts) + void LanguageModelIRST::Load(AllOptions::ptr const& opts) { FactorCollection &factorCollection = FactorCollection::Instance(); diff --git a/moses/LM/IRST.h b/moses/LM/IRST.h index f066a91d2..b4c080378 100644 --- a/moses/LM/IRST.h +++ b/moses/LM/IRST.h @@ -88,7 +88,7 @@ public: bool IsUseable(const FactorMask &mask) const; - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); const FFState *EmptyHypothesisState(const InputType &/*input*/) const; virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = NULL) const; diff --git a/moses/LM/MaxEntSRI.h b/moses/LM/MaxEntSRI.h index 5f80029ca..1f3004e0f 100644 --- a/moses/LM/MaxEntSRI.h +++ b/moses/LM/MaxEntSRI.h @@ -54,7 +54,7 @@ protected: public: LanguageModelMaxEntSRI(const std::string &line); ~LanguageModelMaxEntSRI(); - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = 0) const; }; diff --git a/moses/LM/NeuralLMWrapper.h b/moses/LM/NeuralLMWrapper.h index 2114e87fc..66a0278a9 100644 --- a/moses/LM/NeuralLMWrapper.h +++ b/moses/LM/NeuralLMWrapper.h @@ -27,7 +27,7 @@ public: virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = 0) const; - virtual void Load(AllOptions const& opts); + virtual void Load(AllOptions::ptr const& opts); }; diff --git a/moses/LM/RDLM.h b/moses/LM/RDLM.h index 40f0344f1..8fdc9d641 100644 --- a/moses/LM/RDLM.h +++ b/moses/LM/RDLM.h @@ -208,7 +208,7 @@ public: int /* featureID - used to index the state in the previous hypotheses */, ScoreComponentCollection* accumulator) const; - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); // Iterator-class that yields all children of a node; if child is virtual node of binarized tree, its children are yielded instead. class UnbinarizedChildren diff --git a/moses/LM/Rand.h b/moses/LM/Rand.h index 25d7896bf..54b5738b6 100644 --- a/moses/LM/Rand.h +++ b/moses/LM/Rand.h @@ -39,7 +39,7 @@ public: LanguageModelRandLM(const std::string &line); ~LanguageModelRandLM(); - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = NULL) const; void InitializeForInput(ttasksptr const& ttask); void CleanUpAfterSentenceProcessing(const InputType& source); diff --git a/moses/LM/SRI.h b/moses/LM/SRI.h index 76f34eedc..0a6139832 100644 --- a/moses/LM/SRI.h +++ b/moses/LM/SRI.h @@ -54,7 +54,7 @@ protected: public: LanguageModelSRI(const std::string &line); ~LanguageModelSRI(); - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = 0) const; }; diff --git a/moses/LM/oxlm/OxLM.h b/moses/LM/oxlm/OxLM.h index 11a86a4a4..5c73cd6c7 100644 --- a/moses/LM/oxlm/OxLM.h +++ b/moses/LM/oxlm/OxLM.h @@ -24,7 +24,7 @@ public: void SetParameter(const std::string& key, const std::string& value); - void Load(AllOptions const& opts); + void Load(AllOptions::ptr const& opts); virtual LMResult GetValue( const std::vector<const Word*> &contextFactor, |