Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'moses/src/LM/ParallelBackoff.h')
-rw-r--r--moses/src/LM/ParallelBackoff.h64
1 files changed, 2 insertions, 62 deletions
diff --git a/moses/src/LM/ParallelBackoff.h b/moses/src/LM/ParallelBackoff.h
index 74a598737..8e4241395 100644
--- a/moses/src/LM/ParallelBackoff.h
+++ b/moses/src/LM/ParallelBackoff.h
@@ -21,71 +21,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#pragma once
-#include <vector>
-#include <string>
-#include <sstream>
-#include <fstream>
-
-#include "LM/MultiFactor.h"
-#include "Word.h"
-#include "Factor.h"
-#include "FactorTypeSet.h"
-#include "FactorCollection.h"
-#include "Phrase.h"
-
-#include "FNgramStats.h"
-#include "FactoredVocab.h"
-#include "FNgram.h"
-#include "wmatrix.h"
-#include "Vocab.h"
-
-using namespace std;
-
-//class FactoredVocab;
-//class FNgram;
-//class WidMatrix;
-
-
namespace Moses
{
-/** LM of multiple factors. A simple extension of single factor LM - factors backoff together.
- * Rather slow as this uses string concatenation/split
-*/
-class LanguageModelParallelBackoff : public LanguageModelMultiFactor
-{
-private:
- std::vector<FactorType> m_factorTypesOrdered;
-
- FactoredVocab *m_srilmVocab;
- FNgram *m_srilmModel;
- VocabIndex m_unknownId;
- VocabIndex m_wtid;
- VocabIndex m_wtbid;
- VocabIndex m_wteid;
- FNgramSpecs<FNgramCount>* fnSpecs;
- //std::vector<VocabIndex> m_lmIdLookup;
- std::map<size_t, VocabIndex>* lmIdMap;
- std::fstream* debugStream;
-
- WidMatrix *widMatrix;
-
-public:
- ~LanguageModelParallelBackoff();
-
- bool Load(const std::string &filePath, const std::vector<FactorType> &factorTypes, size_t nGramOrder);
-
- VocabIndex GetLmID( const std::string &str ) const;
-
- VocabIndex GetLmID( const Factor *factor, FactorType ft ) const;
-
- void CreateFactors();
-
- LMResult GetValueForgotState(const std::vector<const Word*> &contextFactor, FFState &outState) const;
- const FFState *GetNullContextState() const;
- const FFState *GetBeginSentenceState() const;
- FFState *NewState(const FFState *from) const;
+class LanguageModelMultiFactor;
-};
+LanguageModelMultiFactor *NewParallelBackoff();
}