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:
authorhieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-02 00:37:52 +0400
committerhieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-02 00:37:52 +0400
commitd6377d775425767c6f0a2600871f654b4e607def (patch)
tree0a846de2580d28ad32d091083ab8d380821f4387
parenteacaf8404d8c5c99e65ec65d04b582b35f4968e3 (diff)
get rid of id in LM class
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@452 1f5c12ca-751b-0410-a591-d2e778427230
-rwxr-xr-xmoses/src/LanguageModel.h9
-rwxr-xr-xmoses/src/LanguageModel_IRST.cpp4
-rwxr-xr-xmoses/src/LanguageModel_IRST.h3
-rwxr-xr-xmoses/src/LanguageModel_Internal.cpp4
-rwxr-xr-xmoses/src/LanguageModel_Internal.h3
-rwxr-xr-xmoses/src/LanguageModel_SRI.h3
-rwxr-xr-xmoses/src/StaticData.cpp2
7 files changed, 8 insertions, 20 deletions
diff --git a/moses/src/LanguageModel.h b/moses/src/LanguageModel.h
index d2909b704..e2e54c54d 100755
--- a/moses/src/LanguageModel.h
+++ b/moses/src/LanguageModel.h
@@ -38,7 +38,7 @@ protected:
const Factor *m_sentenceStart, *m_sentenceEnd;
FactorType m_factorType;
float m_weight;
- size_t m_id, m_nGramOrder;
+ size_t m_nGramOrder;
LmId m_unknownId;
std::string m_filename;
public:
@@ -49,8 +49,7 @@ public:
LanguageModel();
virtual ~LanguageModel();
- virtual void Load(size_t id
- , const std::string &fileName
+ virtual void Load(const std::string &fileName
, FactorCollection &factorCollection
, FactorType factorType
, float weight
@@ -89,10 +88,6 @@ public:
{
m_weight = weight;
}
- size_t GetId() const
- {
- return m_id;
- }
virtual const std::string GetScoreProducerDescription() const;
virtual float GetValue(const std::vector<const Factor*> &contextFactor, State* finalState = 0) const = 0;
diff --git a/moses/src/LanguageModel_IRST.cpp b/moses/src/LanguageModel_IRST.cpp
index 16053308d..976b24ea4 100755
--- a/moses/src/LanguageModel_IRST.cpp
+++ b/moses/src/LanguageModel_IRST.cpp
@@ -48,14 +48,12 @@ LanguageModel_IRST::~LanguageModel_IRST()
}
-void LanguageModel_IRST::Load(size_t id
- , const std::string &fileName
+void LanguageModel_IRST::Load(const std::string &fileName
, FactorCollection &factorCollection
, FactorType factorType
, float weight
, size_t nGramOrder)
{
- m_id = id;
m_factorType = factorType;
m_weight = weight;
m_nGramOrder = nGramOrder;
diff --git a/moses/src/LanguageModel_IRST.h b/moses/src/LanguageModel_IRST.h
index 5dea4b647..cceba882a 100755
--- a/moses/src/LanguageModel_IRST.h
+++ b/moses/src/LanguageModel_IRST.h
@@ -42,8 +42,7 @@ public:
LanguageModel_IRST();
~LanguageModel_IRST();
- void Load(size_t id
- , const std::string &fileName
+ void Load(const std::string &fileName
, FactorCollection &factorCollection
, FactorType factorType
, float weight
diff --git a/moses/src/LanguageModel_Internal.cpp b/moses/src/LanguageModel_Internal.cpp
index dd6041ff8..d7c09f196 100755
--- a/moses/src/LanguageModel_Internal.cpp
+++ b/moses/src/LanguageModel_Internal.cpp
@@ -40,14 +40,12 @@ LanguageModel_Internal::LanguageModel_Internal()
{
}
-void LanguageModel_Internal::Load(size_t id
- , const std::string &fileName
+void LanguageModel_Internal::Load(const std::string &fileName
, FactorCollection &factorCollection
, FactorType factorType
, float weight
, size_t nGramOrder)
{
- m_id = id;
m_factorType = factorType;
m_weight = weight;
m_nGramOrder = nGramOrder;
diff --git a/moses/src/LanguageModel_Internal.h b/moses/src/LanguageModel_Internal.h
index 7ed0dbdfb..feae294a2 100755
--- a/moses/src/LanguageModel_Internal.h
+++ b/moses/src/LanguageModel_Internal.h
@@ -38,8 +38,7 @@ class LanguageModel_Internal : public LanguageModel
public:
LanguageModel_Internal();
- void Load(size_t id
- , const std::string &fileName
+ void Load(const std::string &fileName
, FactorCollection &factorCollection
, FactorType factorType
, float weight
diff --git a/moses/src/LanguageModel_SRI.h b/moses/src/LanguageModel_SRI.h
index ca2ec95c3..d546cb104 100755
--- a/moses/src/LanguageModel_SRI.h
+++ b/moses/src/LanguageModel_SRI.h
@@ -49,8 +49,7 @@ protected:
public:
LanguageModel_SRI();
~LanguageModel_SRI();
- void Load(size_t id
- , const std::string &fileName
+ void Load(const std::string &fileName
, FactorCollection &factorCollection
, FactorType factorType
, float weight
diff --git a/moses/src/StaticData.cpp b/moses/src/StaticData.cpp
index 205697132..4b90fb2c1 100755
--- a/moses/src/StaticData.cpp
+++ b/moses/src/StaticData.cpp
@@ -274,7 +274,7 @@ bool StaticData::LoadParameters(int argc, char* argv[])
LanguageModel *lm = LanguageModelFactory::createLanguageModel();
// error handling here?
- lm->Load(i, languageModelFile, m_factorCollection, factorType, weightAll[i], nGramOrder);
+ lm->Load(languageModelFile, m_factorCollection, factorType, weightAll[i], nGramOrder);
timer.check(("Finished loading LanguageModel " + languageModelFile).c_str());
m_languageModel.push_back(lm);