mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
|
|
#pragma once
|
|
|
|
#include "PhraseDictionary.h"
|
|
|
|
namespace Moses
|
|
{
|
|
class ChartParser;
|
|
class ChartCellCollectionBase;
|
|
class ChartRuleLookupManager;
|
|
class InputPath;
|
|
|
|
class PhraseDictionaryTransliteration : public PhraseDictionary
|
|
{
|
|
friend std::ostream& operator<<(std::ostream&, const PhraseDictionaryTransliteration&);
|
|
|
|
public:
|
|
PhraseDictionaryTransliteration(const std::string &line);
|
|
|
|
virtual void CleanUpAfterSentenceProcessing(const InputType& source);
|
|
|
|
// for phrase-based model
|
|
void GetTargetPhraseCollectionBatch(const InputPathList &inputPathQueue) const;
|
|
|
|
// for syntax/hiero model (CKY+ decoding)
|
|
ChartRuleLookupManager* CreateRuleLookupManager(const ChartParser&, const ChartCellCollectionBase&);
|
|
|
|
void SetParameter(const std::string& key, const std::string& value);
|
|
|
|
TO_STRING();
|
|
|
|
protected:
|
|
mutable std::list<TargetPhraseCollection*> m_allTPColl;
|
|
|
|
std::string m_mosesDir, m_scriptDir, m_externalDir, m_inputLang, m_outputLang;
|
|
|
|
std::vector<TargetPhrase*> CreateTargetPhrases(const Phrase &sourcePhrase, const std::string &outDir) const;
|
|
bool SatisfyBackoff(const InputPath &inputPath) const;
|
|
|
|
};
|
|
|
|
} // namespace Moses
|