diff options
author | heafield <heafield@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-10-13 18:27:01 +0400 |
---|---|---|
committer | heafield <heafield@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-10-13 18:27:01 +0400 |
commit | 07e611ebcb526fba7b0deb12d68faf7fa9647f8b (patch) | |
tree | 9cff485bea0b090ea17ae8fec47e4bd2cc7db870 /moses | |
parent | a95e7910565252e8eae90b35c95380962970b81e (diff) |
Organize language models into an LM directory.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4350 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'moses')
-rw-r--r-- | moses/src/LM/Base.cpp (renamed from moses/src/LanguageModel.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/Base.h (renamed from moses/src/LanguageModel.h) | 13 | ||||
-rw-r--r-- | moses/src/LM/DMap.cpp (renamed from moses/src/LanguageModelDMapLM.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/DMap.h (renamed from moses/src/LanguageModelDMapLM.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/Factory.cpp (renamed from moses/src/LanguageModelFactory.cpp) | 26 | ||||
-rw-r--r-- | moses/src/LM/Factory.h (renamed from moses/src/LanguageModelFactory.h) | 0 | ||||
-rw-r--r-- | moses/src/LM/IRST.cpp (renamed from moses/src/LanguageModelIRST.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/IRST.h (renamed from moses/src/LanguageModelIRST.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/Implementation.cpp (renamed from moses/src/LanguageModelImplementation.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/Implementation.h (renamed from moses/src/LanguageModelImplementation.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/Internal.cpp (renamed from moses/src/LanguageModelInternal.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/Internal.h (renamed from moses/src/LanguageModelInternal.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/Joint.cpp (renamed from moses/src/LanguageModelSkip.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/Joint.h (renamed from moses/src/LanguageModelJoint.h) | 4 | ||||
-rw-r--r-- | moses/src/LM/Ken.cpp (renamed from moses/src/LanguageModelKen.cpp) | 4 | ||||
-rw-r--r-- | moses/src/LM/Ken.h (renamed from moses/src/LanguageModelKen.h) | 0 | ||||
-rw-r--r-- | moses/src/LM/MultiFactor.cpp (renamed from moses/src/LanguageModelMultiFactor.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/MultiFactor.h (renamed from moses/src/LanguageModelMultiFactor.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/ORLM.cpp (renamed from moses/src/LanguageModelORLM.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/ORLM.h (renamed from moses/src/LanguageModelORLM.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/ParallelBackoff.cpp (renamed from moses/src/LanguageModelParallelBackoff.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/ParallelBackoff.h (renamed from moses/src/LanguageModelParallelBackoff.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/RandLM.cpp (renamed from moses/src/LanguageModelRandLM.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/RandLM.h (renamed from moses/src/LanguageModelRandLM.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/Remote.cpp (renamed from moses/src/LanguageModelRemote.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/Remote.h (renamed from moses/src/LanguageModelRemote.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/SRI.cpp (renamed from moses/src/LanguageModelSRI.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/SRI.h (renamed from moses/src/LanguageModelSRI.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/SingleFactor.cpp (renamed from moses/src/LanguageModelSingleFactor.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/SingleFactor.h (renamed from moses/src/LanguageModelSingleFactor.h) | 2 | ||||
-rw-r--r-- | moses/src/LM/Skip.cpp (renamed from moses/src/LanguageModelJoint.cpp) | 2 | ||||
-rw-r--r-- | moses/src/LM/Skip.h (renamed from moses/src/LanguageModelSkip.h) | 4 | ||||
-rw-r--r-- | moses/src/LMList.cpp | 1 | ||||
-rw-r--r-- | moses/src/LMList.h | 2 | ||||
-rw-r--r-- | moses/src/Makefile.am | 64 | ||||
-rw-r--r-- | moses/src/StaticData.cpp | 2 | ||||
-rw-r--r-- | moses/src/StaticData.h | 2 | ||||
-rw-r--r-- | moses/src/TargetPhrase.cpp | 2 | ||||
-rw-r--r-- | moses/src/TranslationOptionCollection.cpp | 2 | ||||
-rw-r--r-- | moses/src/TranslationOptionCollectionConfusionNet.cpp | 2 | ||||
-rw-r--r-- | moses/src/TranslationOptionCollectionText.cpp | 2 |
41 files changed, 86 insertions, 94 deletions
diff --git a/moses/src/LanguageModel.cpp b/moses/src/LM/Base.cpp index d3b031268..e3f011663 100644 --- a/moses/src/LanguageModel.cpp +++ b/moses/src/LM/Base.cpp @@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "LanguageModel.h" +#include "LM/Base.h" #include "TypeDef.h" #include "Util.h" #include "Manager.h" diff --git a/moses/src/LanguageModel.h b/moses/src/LM/Base.h index 41472a3b8..a51fe5411 100644 --- a/moses/src/LanguageModel.h +++ b/moses/src/LM/Base.h @@ -23,12 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #define moses_LanguageModel_h #include <string> -#include <vector> -#include "Factor.h" -#include "TypeDef.h" -#include "Util.h" -#include "FeatureFunction.h" -#include "Word.h" +#include <cstddef> +#include "../FeatureFunction.h" namespace Moses { @@ -36,6 +32,7 @@ namespace Moses class FactorCollection; class Factor; class Phrase; +class ScoreIndexManager; //! Abstract base class which represent a language model on a contiguous phrase class LanguageModel : public StatefulFeatureFunction { @@ -54,7 +51,7 @@ public: virtual LanguageModel *Duplicate(ScoreIndexManager &scoreIndexManager) const = 0; //! see ScoreProducer.h - size_t GetNumScoreComponents() const; + std::size_t GetNumScoreComponents() const; bool OOVFeatureEnabled() const { return m_enableOOVFeature; @@ -86,7 +83,7 @@ public: * \param ngramScore score of only n-gram of order m_nGramOrder * \param oovCount number of LM OOVs */ - virtual void CalcScore(const Phrase &phrase, float &fullScore, float &ngramScore, size_t &oovCount) const = 0; + virtual void CalcScore(const Phrase &phrase, float &fullScore, float &ngramScore, std::size_t &oovCount) const = 0; }; } diff --git a/moses/src/LanguageModelDMapLM.cpp b/moses/src/LM/DMap.cpp index eb2e4b93b..3bef47083 100644 --- a/moses/src/LanguageModelDMapLM.cpp +++ b/moses/src/LM/DMap.cpp @@ -5,7 +5,7 @@ #include <Config.h> #include "FactorCollection.h" -#include "LanguageModelDMapLM.h" +#include "LM/DMapLM.h" namespace Moses { diff --git a/moses/src/LanguageModelDMapLM.h b/moses/src/LM/DMap.h index f1f731dfa..f9fbf56c2 100644 --- a/moses/src/LanguageModelDMapLM.h +++ b/moses/src/LM/DMap.h @@ -9,7 +9,7 @@ #include "Factor.h" #include "FFState.h" -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" #include "Util.h" namespace Moses { diff --git a/moses/src/LanguageModelFactory.cpp b/moses/src/LM/Factory.cpp index 0087ac3a8..9acc6e0a8 100644 --- a/moses/src/LanguageModelFactory.cpp +++ b/moses/src/LM/Factory.cpp @@ -21,39 +21,39 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ #include <iostream> -#include "LanguageModelFactory.h" +#include "LM/Factory.h" #include "UserMessage.h" #include "TypeDef.h" #include "FactorCollection.h" // include appropriate header #ifdef LM_SRI -# include "LanguageModelSRI.h" -#include "LanguageModelParallelBackoff.h" +# include "LM/SRI.h" +#include "LM/ParallelBackoff.h" #endif #ifdef LM_IRST -# include "LanguageModelIRST.h" +# include "LM/IRST.h" #endif #ifdef LM_RAND -# include "LanguageModelRandLM.h" +# include "LM/RandLM.h" #endif #ifdef LM_ORLM -# include "LanguageModelORLM.h" +# include "LM/ORLM.h" #endif #ifdef LM_REMOTE -# include "LanguageModelRemote.h" +# include "LM/Remote.h" #endif #ifdef LM_KEN -# include "LanguageModelKen.h" +# include "LM/Ken.h" #endif #ifdef LM_DMAP -# include "LanguageModelDMapLM.h" +# include "LM/DMapLM.h" #endif -#include "LanguageModel.h" -#include "LanguageModelInternal.h" -#include "LanguageModelSkip.h" -#include "LanguageModelJoint.h" +#include "LM/Base.h" +#include "LM/Internal.h" +#include "LM/Skip.h" +#include "LM/Joint.h" using namespace std; diff --git a/moses/src/LanguageModelFactory.h b/moses/src/LM/Factory.h index 89457887c..89457887c 100644 --- a/moses/src/LanguageModelFactory.h +++ b/moses/src/LM/Factory.h diff --git a/moses/src/LanguageModelIRST.cpp b/moses/src/LM/IRST.cpp index 9ac8c6617..72a83c456 100644 --- a/moses/src/LanguageModelIRST.cpp +++ b/moses/src/LM/IRST.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "n_gram.h" #include "lmContainer.h" -#include "LanguageModelIRST.h" +#include "LM/IRST.h" #include "TypeDef.h" #include "Util.h" #include "FactorCollection.h" diff --git a/moses/src/LanguageModelIRST.h b/moses/src/LM/IRST.h index 58c3036da..2ffe67f98 100644 --- a/moses/src/LanguageModelIRST.h +++ b/moses/src/LM/IRST.h @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "Factor.h" #include "TypeDef.h" #include "Util.h" -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" class lmContainer; // irst lm container for any lm type class ngram; diff --git a/moses/src/LanguageModelImplementation.cpp b/moses/src/LM/Implementation.cpp index b23aeed2c..90fe57225 100644 --- a/moses/src/LanguageModelImplementation.cpp +++ b/moses/src/LM/Implementation.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <sstream> #include "FFState.h" -#include "LanguageModelImplementation.h" +#include "LM/Implementation.h" #include "TypeDef.h" #include "Util.h" #include "Manager.h" diff --git a/moses/src/LanguageModelImplementation.h b/moses/src/LM/Implementation.h index 8af54cc5d..3fe35ce1c 100644 --- a/moses/src/LanguageModelImplementation.h +++ b/moses/src/LM/Implementation.h @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "Util.h" #include "FeatureFunction.h" #include "Word.h" -#include "LanguageModel.h" +#include "LM/Base.h" #ifdef WITH_THREADS #include <boost/shared_ptr.hpp> diff --git a/moses/src/LanguageModelInternal.cpp b/moses/src/LM/Internal.cpp index 7e388b70d..49c75b027 100644 --- a/moses/src/LanguageModelInternal.cpp +++ b/moses/src/LM/Internal.cpp @@ -1,5 +1,5 @@ -#include "LanguageModelInternal.h" +#include "LM/Internal.h" #include "FactorCollection.h" #include "NGramNode.h" #include "InputFileStream.h" diff --git a/moses/src/LanguageModelInternal.h b/moses/src/LM/Internal.h index 4cee6ca76..6963200d2 100644 --- a/moses/src/LanguageModelInternal.h +++ b/moses/src/LM/Internal.h @@ -1,7 +1,7 @@ #ifndef moses_LanguageModelInternal_h #define moses_LanguageModelInternal_h -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" #include "NGramCollection.h" namespace Moses diff --git a/moses/src/LanguageModelSkip.cpp b/moses/src/LM/Joint.cpp index e0263127e..266f08029 100644 --- a/moses/src/LanguageModelSkip.cpp +++ b/moses/src/LM/Joint.cpp @@ -19,4 +19,4 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "LanguageModelSkip.h" +#include "LM/Joint.h" diff --git a/moses/src/LanguageModelJoint.h b/moses/src/LM/Joint.h index 88515360e..e000409be 100644 --- a/moses/src/LanguageModelJoint.h +++ b/moses/src/LM/Joint.h @@ -25,8 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <vector> #include <string> #include <sstream> -#include "LanguageModelSingleFactor.h" -#include "LanguageModelMultiFactor.h" +#include "LM/SingleFactor.h" +#include "LM/MultiFactor.h" #include "Word.h" #include "FactorTypeSet.h" #include "FactorCollection.h" diff --git a/moses/src/LanguageModelKen.cpp b/moses/src/LM/Ken.cpp index 8e2cde4c9..22b390c19 100644 --- a/moses/src/LanguageModelKen.cpp +++ b/moses/src/LM/Ken.cpp @@ -29,8 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "lm/left.hh" #include "lm/model.hh" -#include "LanguageModelKen.h" -#include "LanguageModel.h" +#include "LM/Ken.h" +#include "LM/Base.h" #include "FFState.h" #include "TypeDef.h" #include "Util.h" diff --git a/moses/src/LanguageModelKen.h b/moses/src/LM/Ken.h index 0a4076111..0a4076111 100644 --- a/moses/src/LanguageModelKen.h +++ b/moses/src/LM/Ken.h diff --git a/moses/src/LanguageModelMultiFactor.cpp b/moses/src/LM/MultiFactor.cpp index 67474b641..672c924d2 100644 --- a/moses/src/LanguageModelMultiFactor.cpp +++ b/moses/src/LM/MultiFactor.cpp @@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "LanguageModelMultiFactor.h" +#include "LM/MultiFactor.h" #include "Phrase.h" namespace Moses diff --git a/moses/src/LanguageModelMultiFactor.h b/moses/src/LM/MultiFactor.h index 4225f4a3a..bcd43326c 100644 --- a/moses/src/LanguageModelMultiFactor.h +++ b/moses/src/LM/MultiFactor.h @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <vector> #include <string> -#include "LanguageModelImplementation.h" +#include "LM/Implementation.h" #include "Word.h" #include "FactorTypeSet.h" diff --git a/moses/src/LanguageModelORLM.cpp b/moses/src/LM/ORLM.cpp index 80c16770b..4fb365ff8 100644 --- a/moses/src/LanguageModelORLM.cpp +++ b/moses/src/LM/ORLM.cpp @@ -7,7 +7,7 @@ #include "Phrase.h" #include "InputFileStream.h" #include "StaticData.h" -#include "LanguageModelORLM.h" +#include "LM/ORLM.h" using std::map; namespace Moses diff --git a/moses/src/LanguageModelORLM.h b/moses/src/LM/ORLM.h index ba3ad0b75..c1ccb4387 100644 --- a/moses/src/LanguageModelORLM.h +++ b/moses/src/LM/ORLM.h @@ -4,7 +4,7 @@ #include <vector> #include "Factor.h" #include "Util.h" -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" #include "onlineRLM.h" //#include "multiOnlineRLM.h" #include "DynSAInclude/file.h" diff --git a/moses/src/LanguageModelParallelBackoff.cpp b/moses/src/LM/ParallelBackoff.cpp index bf24d4ac8..70638d465 100644 --- a/moses/src/LanguageModelParallelBackoff.cpp +++ b/moses/src/LM/ParallelBackoff.cpp @@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "LanguageModelParallelBackoff.h" +#include "LM/ParallelBackoff.h" #include "File.h" #include "TypeDef.h" #include "Util.h" diff --git a/moses/src/LanguageModelParallelBackoff.h b/moses/src/LM/ParallelBackoff.h index afbfab2ce..8d260685d 100644 --- a/moses/src/LanguageModelParallelBackoff.h +++ b/moses/src/LM/ParallelBackoff.h @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <sstream> #include <fstream> -#include "LanguageModelMultiFactor.h" +#include "LM/MultiFactor.h" #include "Word.h" #include "Factor.h" #include "FactorTypeSet.h" diff --git a/moses/src/LanguageModelRandLM.cpp b/moses/src/LM/RandLM.cpp index d75dc188b..de03ea58d 100644 --- a/moses/src/LanguageModelRandLM.cpp +++ b/moses/src/LM/RandLM.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <iostream> #include <fstream> -#include "LanguageModelRandLM.h" +#include "LM/RandLM.h" #include "FactorCollection.h" #include "Phrase.h" #include "InputFileStream.h" diff --git a/moses/src/LanguageModelRandLM.h b/moses/src/LM/RandLM.h index b902d2d21..8de5f3bb1 100644 --- a/moses/src/LanguageModelRandLM.h +++ b/moses/src/LM/RandLM.h @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <vector> #include "Factor.h" #include "Util.h" -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" #include "RandLM.h" class randlm::RandLM; diff --git a/moses/src/LanguageModelRemote.cpp b/moses/src/LM/Remote.cpp index 5abe5a109..78380c75e 100644 --- a/moses/src/LanguageModelRemote.cpp +++ b/moses/src/LM/Remote.cpp @@ -6,7 +6,7 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> -#include "LanguageModelRemote.h" +#include "LM/Remote.h" #include "Factor.h" namespace Moses diff --git a/moses/src/LanguageModelRemote.h b/moses/src/LM/Remote.h index db709c596..9a70d64c0 100644 --- a/moses/src/LanguageModelRemote.h +++ b/moses/src/LM/Remote.h @@ -1,7 +1,7 @@ #ifndef moses_LanguageModelRemote_h #define moses_LanguageModelRemote_h -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" #include "TypeDef.h" #include "Factor.h" #include <sys/socket.h> diff --git a/moses/src/LanguageModelSRI.cpp b/moses/src/LM/SRI.cpp index 967dcd8ed..0c93af279 100644 --- a/moses/src/LanguageModelSRI.cpp +++ b/moses/src/LM/SRI.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <iostream> #include <fstream> -#include "LanguageModelSRI.h" +#include "LM/SRI.h" #include "TypeDef.h" #include "Util.h" #include "FactorCollection.h" diff --git a/moses/src/LanguageModelSRI.h b/moses/src/LM/SRI.h index 927939bb3..19932b9c9 100644 --- a/moses/src/LanguageModelSRI.h +++ b/moses/src/LM/SRI.h @@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "TypeDef.h" #include "Vocab.h" #include "Ngram.h" -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" class Factor; class Phrase; diff --git a/moses/src/LanguageModelSingleFactor.cpp b/moses/src/LM/SingleFactor.cpp index 026d76030..371ac7c95 100644 --- a/moses/src/LanguageModelSingleFactor.cpp +++ b/moses/src/LM/SingleFactor.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <iostream> #include <sstream> -#include "LanguageModelSingleFactor.h" +#include "LM/SingleFactor.h" #include "TypeDef.h" #include "Util.h" #include "FactorCollection.h" diff --git a/moses/src/LanguageModelSingleFactor.h b/moses/src/LM/SingleFactor.h index f236a3d4d..b5b79e2ff 100644 --- a/moses/src/LanguageModelSingleFactor.h +++ b/moses/src/LM/SingleFactor.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #ifndef moses_LanguageModelSingleFactor_h #define moses_LanguageModelSingleFactor_h -#include "LanguageModelImplementation.h" +#include "LM/Implementation.h" #include "Phrase.h" namespace Moses diff --git a/moses/src/LanguageModelJoint.cpp b/moses/src/LM/Skip.cpp index 3ad8dbbd9..c806605f0 100644 --- a/moses/src/LanguageModelJoint.cpp +++ b/moses/src/LM/Skip.cpp @@ -19,4 +19,4 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "LanguageModelJoint.h" +#include "LM/Skip.h" diff --git a/moses/src/LanguageModelSkip.h b/moses/src/LM/Skip.h index 6e67c6079..e95b71644 100644 --- a/moses/src/LanguageModelSkip.h +++ b/moses/src/LM/Skip.h @@ -24,8 +24,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <vector> #include <algorithm> -#include "LanguageModelMultiFactor.h" -#include "LanguageModelSingleFactor.h" +#include "LM/MultiFactor.h" +#include "LM/SingleFactor.h" #include "Phrase.h" #include "FactorCollection.h" diff --git a/moses/src/LMList.cpp b/moses/src/LMList.cpp index bb75a9c1d..8142b05b3 100644 --- a/moses/src/LMList.cpp +++ b/moses/src/LMList.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "StaticData.h" #include "LMList.h" #include "Phrase.h" -#include "LanguageModelSingleFactor.h" #include "ScoreComponentCollection.h" using namespace std; diff --git a/moses/src/LMList.h b/moses/src/LMList.h index fcc208022..5b58b7cc0 100644 --- a/moses/src/LMList.h +++ b/moses/src/LMList.h @@ -2,7 +2,7 @@ #define moses_LMList_h #include <list> -#include "LanguageModel.h" +#include "LM/Base.h" namespace Moses { diff --git a/moses/src/Makefile.am b/moses/src/Makefile.am index 36179dc18..7f81ca641 100644 --- a/moses/src/Makefile.am +++ b/moses/src/Makefile.am @@ -58,16 +58,16 @@ libmoses_la_HEADERS = \ InputType.h \ LMList.h \ LVoc.h \ - LanguageModel.h \ - LanguageModelJoint.h \ - LanguageModelFactory.h \ - LanguageModelImplementation.h \ - LanguageModelInternal.h \ - LanguageModelMultiFactor.h \ - LanguageModelRemote.h \ - LanguageModelSingleFactor.h \ - LanguageModelSkip.h \ - LanguageModelKen.h \ + LM/Base.h \ + LM/Joint.h \ + LM/Factory.h \ + LM/Implementation.h \ + LM/Internal.h \ + LM/MultiFactor.h \ + LM/Remote.h \ + LM/SingleFactor.h \ + LM/Skip.h \ + LM/Ken.h \ LexicalReordering.h \ LexicalReorderingState.h \ LexicalReorderingTable.h \ @@ -138,20 +138,20 @@ libmoses_la_HEADERS += rule.pb.h hypergraph.pb.h endif if SRI_LM -libmoses_la_HEADERS += LanguageModelSRI.h \ - LanguageModelParallelBackoff.h +libmoses_la_HEADERS += LM/SRI.h \ + LM/ParallelBackoff.h endif if IRST_LM -libmoses_la_HEADERS += LanguageModelIRST.h +libmoses_la_HEADERS += LM/IRST.h endif if RAND_LM -libmoses_la_HEADERS += LanguageModelRandLM.h +libmoses_la_HEADERS += LM/RandLM.h endif if ORLM_LM -libmoses_la_HEADERS += LanguageModelORLM.h \ +libmoses_la_HEADERS += LM/ORLM.h \ DynSAInclude/params.h \ DynSAInclude/hash.h \ DynSAInclude/quantizer.h \ @@ -160,7 +160,7 @@ libmoses_la_HEADERS += LanguageModelORLM.h \ endif if INTERNAL_LM -libmoses_la_HEADERS += LanguageModelInternal.h \ +libmoses_la_HEADERS += LM/Internal.h \ NGramCollection.h \ NGramNode.h endif @@ -220,15 +220,15 @@ libmoses_la_SOURCES = \ InputType.cpp \ LMList.cpp \ LVoc.cpp \ - LanguageModel.cpp \ - LanguageModelFactory.cpp \ - LanguageModelImplementation.cpp \ - LanguageModelInternal.cpp \ - LanguageModelJoint.cpp \ - LanguageModelMultiFactor.cpp \ - LanguageModelRemote.cpp \ - LanguageModelSingleFactor.cpp \ - LanguageModelSkip.cpp \ + LM/Base.cpp \ + LM/Factory.cpp \ + LM/Implementation.cpp \ + LM/Internal.cpp \ + LM/Joint.cpp \ + LM/MultiFactor.cpp \ + LM/Remote.cpp \ + LM/SingleFactor.cpp \ + LM/Skip.cpp \ LexicalReordering.cpp \ LexicalReorderingState.cpp \ LexicalReorderingTable.cpp \ @@ -313,28 +313,28 @@ libmoses_la_SOURCES += rule.pb.cc hypergraph.pb.cc endif if SRI_LM -libmoses_la_SOURCES += LanguageModelSRI.cpp \ - LanguageModelParallelBackoff.cpp +libmoses_la_SOURCES += LM/SRI.cpp \ + LM/ParallelBackoff.cpp endif if IRST_LM -libmoses_la_SOURCES += LanguageModelIRST.cpp +libmoses_la_SOURCES += LM/IRST.cpp endif if RAND_LM -libmoses_la_SOURCES += LanguageModelRandLM.cpp +libmoses_la_SOURCES += LM/RandLM.cpp endif if ORLM_LM -libmoses_la_SOURCES += LanguageModelORLM.cpp \ +libmoses_la_SOURCES += LM/ORLM.cpp \ DynSAInclude/onlineRLM.h \ DynSAInclude/perfecthash.h \ DynSAInclude/params.cpp endif if INTERNAL_LM -libmoses_la_SOURCES += LanguageModelInternal.cpp \ +libmoses_la_SOURCES += LM/Internal.cpp \ NGramCollection.cpp \ NGramNode.cpp endif @@ -344,7 +344,7 @@ libmoses_la_SOURCES += SyntacticLanguageModel.cpp endif if KEN_LM -libmoses_la_SOURCES += LanguageModelKen.cpp +libmoses_la_SOURCES += LM/Ken.cpp endif libmoses_la_LIBADD = $(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS) diff --git a/moses/src/StaticData.cpp b/moses/src/StaticData.cpp index 52682641c..e96b71b53 100644 --- a/moses/src/StaticData.cpp +++ b/moses/src/StaticData.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "Util.h" #include "FactorCollection.h" #include "Timer.h" -#include "LanguageModelFactory.h" +#include "LM/Factory.h" #include "LexicalReordering.h" #include "GlobalLexicalModel.h" #include "SentenceStats.h" diff --git a/moses/src/StaticData.h b/moses/src/StaticData.h index 706c8ec7c..0eb3c9f3b 100644 --- a/moses/src/StaticData.h +++ b/moses/src/StaticData.h @@ -40,7 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "ScoreIndexManager.h" #include "FactorCollection.h" #include "Parameter.h" -#include "LanguageModel.h" +#include "LM/Base.h" #include "LMList.h" #include "SentenceStats.h" #include "DecodeGraph.h" diff --git a/moses/src/TargetPhrase.cpp b/moses/src/TargetPhrase.cpp index 6e4181624..b3c14bcb5 100644 --- a/moses/src/TargetPhrase.cpp +++ b/moses/src/TargetPhrase.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "TargetPhrase.h" #include "PhraseDictionaryMemory.h" #include "GenerationDictionary.h" -#include "LanguageModel.h" +#include "LM/Base.h" #include "StaticData.h" #include "ScoreIndexManager.h" #include "LMList.h" diff --git a/moses/src/TranslationOptionCollection.cpp b/moses/src/TranslationOptionCollection.cpp index 3e1c4bc84..249f0cdcc 100644 --- a/moses/src/TranslationOptionCollection.cpp +++ b/moses/src/TranslationOptionCollection.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "TranslationOptionCollection.h" #include "Sentence.h" #include "DecodeStep.h" -#include "LanguageModel.h" +#include "LM/Base.h" #include "PhraseDictionaryMemory.h" #include "FactorCollection.h" #include "InputType.h" diff --git a/moses/src/TranslationOptionCollectionConfusionNet.cpp b/moses/src/TranslationOptionCollectionConfusionNet.cpp index 7c7e5b47b..c2713fb3a 100644 --- a/moses/src/TranslationOptionCollectionConfusionNet.cpp +++ b/moses/src/TranslationOptionCollectionConfusionNet.cpp @@ -3,10 +3,8 @@ #include "TranslationOptionCollectionConfusionNet.h" #include "ConfusionNet.h" #include "DecodeStep.h" -#include "LanguageModel.h" #include "PhraseDictionaryMemory.h" #include "FactorCollection.h" -#include "LMList.h" namespace Moses { diff --git a/moses/src/TranslationOptionCollectionText.cpp b/moses/src/TranslationOptionCollectionText.cpp index fc65964d0..c3676eaef 100644 --- a/moses/src/TranslationOptionCollectionText.cpp +++ b/moses/src/TranslationOptionCollectionText.cpp @@ -22,11 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "TranslationOptionCollectionText.h" #include "Sentence.h" #include "DecodeStep.h" -#include "LanguageModel.h" #include "PhraseDictionaryMemory.h" #include "FactorCollection.h" #include "WordsRange.h" -#include "LMList.h" using namespace std; |