diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-08 15:56:55 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-08 15:56:55 +0300 |
commit | fdb5d9b282fe51fecca14f3d6226eb5980fbe6f5 (patch) | |
tree | 0bef491d0d2344e43cd5f407357cb3e79ada3d04 /defer | |
parent | 9528b56242de61c824b15e790cf4abe72e2ceb66 (diff) |
Code refactoring: All FF now get access to AllOptions at load time, so they don't have to rely on StaticData.
Diffstat (limited to 'defer')
-rw-r--r-- | defer/ExternalFeature.cpp | 2 | ||||
-rw-r--r-- | defer/ExternalFeature.h | 2 | ||||
-rw-r--r-- | defer/Joint.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/defer/ExternalFeature.cpp b/defer/ExternalFeature.cpp index 602971d2b..0bbcfbfd0 100644 --- a/defer/ExternalFeature.cpp +++ b/defer/ExternalFeature.cpp @@ -15,7 +15,7 @@ ExternalFeatureState::ExternalFeatureState(int stateSize, void *data) memcpy(m_data, data, stateSize); } -void ExternalFeature::Load() +void ExternalFeature::Load(AllOptions const& opts) { string nparam = "testing"; diff --git a/defer/ExternalFeature.h b/defer/ExternalFeature.h index 3755bf4ff..403d3c6c4 100644 --- a/defer/ExternalFeature.h +++ b/defer/ExternalFeature.h @@ -43,7 +43,7 @@ public: } ~ExternalFeature(); - void Load(); + void Load(AllOptions const& opts); bool IsUseable(const FactorMask &mask) const { return true; diff --git a/defer/Joint.h b/defer/Joint.h index 1dbdb019e..88547585a 100644 --- a/defer/Joint.h +++ b/defer/Joint.h @@ -58,7 +58,7 @@ public: delete m_lmImpl; } - bool Load(const std::string &filePath + bool Load(AllOptions const& opts, const std::string &filePath , const std::vector<FactorType> &factorTypes , size_t nGramOrder) { m_factorTypes = FactorMask(factorTypes); @@ -77,7 +77,7 @@ public: m_sentenceEndWord[factorType] = factorCollection.AddFactor(Output, factorType, EOS_); } - m_lmImpl->Load(); + m_lmImpl->Load(AllOptions const& opts); } LMResult GetValueForgotState(const std::vector<const Word*> &contextFactor, FFState &outState) const { |