blob: 9d2b0d7681bef2ed7527a45197d86f065e6e0abd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#pragma once
#include "PhraseDictionary.h"
#include <boost/thread/tss.hpp>
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);
void Load();
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&, std::size_t);
void SetParameter(const std::string& key, const std::string& value);
TO_STRING();
protected:
std::string m_mosesDir, m_scriptDir, m_externalDir, m_inputLang, m_outputLang;
std::vector<TargetPhrase*> CreateTargetPhrases(const Phrase &sourcePhrase, const std::string &outDir) const;
void GetTargetPhraseCollection(InputPath &inputPath) const;
};
} // namespace Moses
|