2013-12-02 19:29:13 +04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "PhraseDictionary.h"
|
|
|
|
|
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
class ChartParser;
|
|
|
|
class ChartCellCollectionBase;
|
|
|
|
class ChartRuleLookupManager;
|
2013-12-05 17:06:35 +04:00
|
|
|
class InputPath;
|
2013-12-02 19:29:13 +04:00
|
|
|
|
|
|
|
class TransliterationPhraseDictionary : public PhraseDictionary
|
|
|
|
{
|
|
|
|
friend std::ostream& operator<<(std::ostream&, const TransliterationPhraseDictionary&);
|
|
|
|
|
|
|
|
public:
|
|
|
|
TransliterationPhraseDictionary(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&);
|
|
|
|
|
2013-12-04 23:16:37 +04:00
|
|
|
void SetParameter(const std::string& key, const std::string& value);
|
|
|
|
|
2013-12-02 19:29:13 +04:00
|
|
|
TO_STRING();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
mutable std::list<TargetPhraseCollection*> m_allTPColl;
|
|
|
|
|
2013-12-04 23:16:37 +04:00
|
|
|
std::string m_mosesDir, m_scriptDir, m_externalDir, m_inputLang, m_outputLang;
|
|
|
|
|
2013-12-04 22:47:33 +04:00
|
|
|
std::vector<TargetPhrase*> CreateTargetPhrases(const Phrase &sourcePhrase, const std::string &outDir) const;
|
2013-12-05 17:06:35 +04:00
|
|
|
bool SatisfyBackoff(const InputPath &inputPath) const;
|
|
|
|
|
2013-12-02 19:29:13 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Moses
|