delete references to LMList

This commit is contained in:
Hieu Hoang 2013-05-21 12:47:26 +01:00
parent 70873c3b8d
commit 42ddc084b4
9 changed files with 2 additions and 16 deletions

View File

@ -187,7 +187,6 @@ protected:
, const std::vector<FactorType> &output
, const std::string &filePath
, const std::vector<float> &weight
, const LMList &languageModels
) {
// set my members

View File

@ -37,7 +37,6 @@ ChartRuleLookupManagerOnDisk::ChartRuleLookupManagerOnDisk(
const ChartCellCollectionBase &cellColl,
const PhraseDictionaryOnDisk &dictionary,
OnDiskPt::OnDiskWrapper &dbWrapper,
const LMList *languageModels,
const WordPenaltyProducer *wpProducer,
const std::vector<FactorType> &inputFactorsVec,
const std::vector<FactorType> &outputFactorsVec,
@ -45,7 +44,6 @@ ChartRuleLookupManagerOnDisk::ChartRuleLookupManagerOnDisk(
: ChartRuleLookupManagerCYKPlus(sentence, cellColl)
, m_dictionary(dictionary)
, m_dbWrapper(dbWrapper)
, m_languageModels(languageModels)
, m_wpProducer(wpProducer)
, m_inputFactorsVec(inputFactorsVec)
, m_outputFactorsVec(outputFactorsVec)

View File

@ -40,7 +40,6 @@ class ChartRuleLookupManagerOnDisk : public ChartRuleLookupManagerCYKPlus
const ChartCellCollectionBase &cellColl,
const PhraseDictionaryOnDisk &dictionary,
OnDiskPt::OnDiskWrapper &dbWrapper,
const LMList *languageModels,
const WordPenaltyProducer *wpProducer,
const std::vector<FactorType> &inputFactorsVec,
const std::vector<FactorType> &outputFactorsVec,
@ -54,7 +53,6 @@ class ChartRuleLookupManagerOnDisk : public ChartRuleLookupManagerCYKPlus
private:
const PhraseDictionaryOnDisk &m_dictionary;
OnDiskPt::OnDiskWrapper &m_dbWrapper;
const LMList *m_languageModels;
const WordPenaltyProducer *m_wpProducer;
const std::vector<FactorType> &m_inputFactorsVec;
const std::vector<FactorType> &m_outputFactorsVec;

View File

@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "moses/WordsRange.h"
#include "moses/UserMessage.h"
#include "moses/ThreadPool.h"
#include "moses/LMList.h"
#include "moses/DummyScoreProducers.h"
using namespace std;
@ -49,7 +48,6 @@ bool PhraseDictionaryCompact::InitDictionary()
m_weight = staticData.GetWeights(this);
m_weightWP = staticData.GetWeight(staticData.GetWordPenaltyProducer());
m_languageModels = &staticData.GetLMList();
std::string tFilePath = m_filePath;

View File

@ -67,7 +67,6 @@ protected:
StringVector<unsigned char, size_t, std::allocator> m_targetPhrasesMemory;
std::vector<float> m_weight;
const LMList* m_languageModels;
float m_weightWP;
public:

View File

@ -24,12 +24,10 @@ bool PhraseDictionaryDynSuffixArray::Load(const std::vector<FactorType>& input,
string source, string target, string alignments,
const std::vector<float> &weight,
size_t tableLimit,
const LMList &languageModels,
float weightWP)
{
m_tableLimit = tableLimit;
m_languageModels = &languageModels;
m_weight = weight;
m_weightWP = weightWP;

View File

@ -24,7 +24,6 @@ public:
, std::string m_alignments
, const std::vector<float> &m_weight
, size_t m_tableLimit
, const LMList &languageModels
, float weightWP);
// functions below required by base class
const TargetPhraseCollection* GetTargetPhraseCollection(const Phrase& src) const;
@ -35,7 +34,6 @@ private:
BilingualDynSuffixArray *m_biSA;
std::vector<float> m_weight;
size_t m_tableLimit;
const LMList *m_languageModels;
float m_weightWP;

View File

@ -45,8 +45,6 @@ void PhraseDictionaryTreeAdaptor::InitializeForInput(InputType const& source)
PDTAimp *obj = new PDTAimp(this,m_numInputScores);
const LMList &languageModels = staticData.GetLMList();
vector<float> weight = staticData.GetWeights(this);
if(m_numScoreComponents!=weight.size()) {
std::stringstream strme;
@ -56,7 +54,7 @@ void PhraseDictionaryTreeAdaptor::InitializeForInput(InputType const& source)
abort();
}
obj->Create(m_input, m_output, m_filePath, weight, languageModels);
obj->Create(m_input, m_output, m_filePath, weight);
obj->CleanUp();
// caching only required for confusion net

View File

@ -57,7 +57,7 @@ ChartRuleLookupManager *PhraseDictionaryOnDisk::CreateRuleLookupManager(
const ChartCellCollectionBase &cellCollection)
{
return new ChartRuleLookupManagerOnDisk(sentence, cellCollection, *this,
GetImplementation(), m_languageModels,
GetImplementation(),
m_wpProducer, m_input,
m_output, m_filePath);
}