clean up CleanUpAfterSentenceProcessing()

This commit is contained in:
Hieu Hoang 2012-12-24 14:34:34 +00:00
parent 485db07068
commit 961cc53ae5
9 changed files with 2 additions and 28 deletions

View File

@ -76,7 +76,7 @@ public:
virtual LanguageModel* Duplicate(
ScoreIndexManager& scoreIndexManager) const;
virtual void InitializeBeforeSentenceProcessing();
virtual void CleanUpAfterSentenceProcessing();
virtual void CleanUpAfterSentenceProcessing(const InputType &source);
virtual const FFState* EmptyHypothesisState(const InputType& input) const;
virtual bool Useable(const Phrase& phrase) const;
virtual void CalcScore(const Phrase& phrase,
@ -184,7 +184,7 @@ void LanguageModelLDHT::InitializeBeforeSentenceProcessing() {
m_start_tick = LDHT::Util::rdtsc();
}
void LanguageModelLDHT::CleanUpAfterSentenceProcessing() {
void LanguageModelLDHT::CleanUpAfterSentenceProcessing(const InputType &source) {
LDHT::Client* client = getClientSafe();
std::cerr << "LDHT sentence stats:" << std::endl;

View File

@ -214,11 +214,6 @@ bool BilingualDynSuffixArray::ExtractPhrases(const int& sntIndex, const int& wor
return curSnt.Extract(m_maxPhraseLength, phrasePairs, leftIdx, rightIdx); // extract all phrase Alignments in sentence
}
void BilingualDynSuffixArray::CleanUp(const InputType& source)
{
//m_wordPairCache.clear();
}
int BilingualDynSuffixArray::LoadCorpus(InputFileStream& corpus, const FactorList& factors,
std::vector<wordID_t>& cArray, std::vector<wordID_t>& sntArray,
Vocab* vocab)

View File

@ -98,7 +98,6 @@ public:
std::string source, std::string target, std::string alignments,
const std::vector<float> &weight);
void GetTargetPhrasesByLexicalWeight(const Phrase& src, std::vector< std::pair<Scores, TargetPhrase*> >& target) const;
void CleanUp(const InputType& source);
void addSntPair(string& source, string& target, string& alignment);
private:
DynSuffixArray* m_srcSA;

View File

@ -43,11 +43,6 @@ void PhraseDictionaryDynSuffixArray::InitializeForInput(const InputType& input)
CHECK(&input == &input);
}
void PhraseDictionaryDynSuffixArray::CleanUp(const InputType &source)
{
m_biSA->CleanUp(source);
}
const TargetPhraseCollection *PhraseDictionaryDynSuffixArray::GetTargetPhraseCollection(const Phrase& src) const
{
TargetPhraseCollection *ret = new TargetPhraseCollection();

View File

@ -29,7 +29,6 @@ public:
// functions below required by base class
const TargetPhraseCollection* GetTargetPhraseCollection(const Phrase& src) const;
void InitializeForInput(const InputType& i);
void CleanUp(const InputType &source);
void insertSnt(string&, string&, string&);
void deleteSnt(unsigned, unsigned);
ChartRuleLookupManager *CreateRuleLookupManager(const InputType&, const ChartCellCollectionBase&);

View File

@ -32,7 +32,6 @@ namespace Moses
{
PhraseDictionaryOnDisk::~PhraseDictionaryOnDisk()
{
CleanUp();
}
bool PhraseDictionaryOnDisk::Load(const std::vector<FactorType> &input
@ -79,11 +78,6 @@ void PhraseDictionaryOnDisk::InitializeForInput(const InputType& /* input */)
// Nothing to do: sentence-specific state is stored in ChartRuleLookupManager
}
void PhraseDictionaryOnDisk::CleanUp()
{
// Nothing to do: sentence-specific state is stored in ChartRuleLookupManager
}
void PhraseDictionaryOnDisk::LoadTargetLookup()
{
// TODO

View File

@ -74,7 +74,6 @@ public:
virtual const TargetPhraseCollection *GetTargetPhraseCollection(const Phrase& src) const;
void InitializeForInput(const InputType& input);
void CleanUp();
virtual ChartRuleLookupManager *CreateRuleLookupManager(
const InputType &,

View File

@ -28,7 +28,6 @@ namespace Moses
RuleTableTrie::~RuleTableTrie()
{
CleanUp();
}
bool RuleTableTrie::Load(const std::vector<FactorType> &input,
@ -58,9 +57,5 @@ void RuleTableTrie::InitializeForInput(const InputType& /* input */)
// Nothing to do: sentence-specific state is stored in ChartRuleLookupManager
}
void RuleTableTrie::CleanUp()
{
// Nothing to do: sentence-specific state is stored in ChartRuleLookupManager
}
} // namespace Moses

View File

@ -67,8 +67,6 @@ class RuleTableTrie : public PhraseDictionary
virtual void InitializeForInput(const InputType& i);
void CleanUp();
private:
friend class RuleTableLoader;