diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-02-08 22:29:16 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-02-08 22:29:16 +0400 |
commit | b9455e0744f827ba4c650d73ccd015f0faf0d611 (patch) | |
tree | 985e5b2236763e580883181e8ddd7612f08c70a0 /moses | |
parent | 6a7ec0d9769bcf9c234f85651edf12cd69052531 (diff) |
Compile ORLM. The existing code should to be refactored.
Diffstat (limited to 'moses')
-rw-r--r-- | moses/src/DynSAInclude/Jamfile | 1 | ||||
-rw-r--r-- | moses/src/LM/Factory.cpp | 10 | ||||
-rw-r--r-- | moses/src/LM/Implementation.h | 2 | ||||
-rw-r--r-- | moses/src/LM/Jamfile | 6 |
4 files changed, 12 insertions, 7 deletions
diff --git a/moses/src/DynSAInclude/Jamfile b/moses/src/DynSAInclude/Jamfile new file mode 100644 index 000000000..ff4bd6f76 --- /dev/null +++ b/moses/src/DynSAInclude/Jamfile @@ -0,0 +1 @@ +lib dynsa : [ glob *.cpp ] ../../../util//kenutil : : : <include>. ; diff --git a/moses/src/LM/Factory.cpp b/moses/src/LM/Factory.cpp index 13cc0fdba..68dc06e4a 100644 --- a/moses/src/LM/Factory.cpp +++ b/moses/src/LM/Factory.cpp @@ -37,13 +37,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #ifdef LM_RAND # include "LM/Rand.h" #endif -#ifdef LM_ORLM -# include "LM/ORLM.h" -#endif + +#include "LM/ORLM.h" + #ifdef LM_REMOTE # include "LM/Remote.h" #endif + #include "LM/Ken.h" + #ifdef LM_DMAP # include "LM/DMapLM.h" #endif @@ -77,9 +79,7 @@ LanguageModel* CreateLanguageModel(LMImplementation lmImplementation #endif break; case ORLM: -#ifdef LM_ORLM lm = new LanguageModelORLM(); -#endif break; case Remote: #ifdef LM_REMOTE diff --git a/moses/src/LM/Implementation.h b/moses/src/LM/Implementation.h index 1ea59b6b3..66e41712f 100644 --- a/moses/src/LM/Implementation.h +++ b/moses/src/LM/Implementation.h @@ -168,6 +168,8 @@ class LMRefCount : public LanguageModel { return m_impl->GetScoreProducerDescription(param); } + LanguageModelImplementation *MosesServerCppShouldNotHaveLMCode() { return m_impl.get(); } + private: LMRefCount(ScoreIndexManager &scoreIndexManager, const LMRefCount ©_from) : m_impl(copy_from.m_impl) { Init(scoreIndexManager); diff --git a/moses/src/LM/Jamfile b/moses/src/LM/Jamfile index b7d7312fd..372bb79f3 100644 --- a/moses/src/LM/Jamfile +++ b/moses/src/LM/Jamfile @@ -44,9 +44,11 @@ if $(with-randlm) { dependencies += rand ; } -obj Factory.o : Factory.cpp ..//headers $(dependencies) ; +obj ORLM.o : ORLM.cpp ..//headers ../DynSAInclude//dynsa : : : <include>../DynSAInclude ; -lib LM : Base.cpp Factory.o Implementation.cpp Joint.cpp Ken.cpp MultiFactor.cpp Remote.cpp SingleFactor.cpp +obj Factory.o : Factory.cpp ..//headers $(dependencies) : <include>../DynSAInclude ; + +lib LM : Base.cpp Factory.o Implementation.cpp Joint.cpp Ken.cpp MultiFactor.cpp Remote.cpp SingleFactor.cpp ORLM.o ../../../lm//kenlm ..//headers $(dependencies) ; #Huge kludge to force building if different --with options are passed. |