mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 12:52:29 +03:00
clean up CleanUpAfterSentenceProcessing()
This commit is contained in:
parent
485db07068
commit
961cc53ae5
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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&);
|
||||
|
@ -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
|
||||
|
@ -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 &,
|
||||
|
@ -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
|
||||
|
@ -67,8 +67,6 @@ class RuleTableTrie : public PhraseDictionary
|
||||
|
||||
virtual void InitializeForInput(const InputType& i);
|
||||
|
||||
void CleanUp();
|
||||
|
||||
private:
|
||||
friend class RuleTableLoader;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user