diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-07-18 23:23:44 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-07-18 23:23:44 +0400 |
commit | 0b5776faf7919d51e64f9bc8c9973c5e3caa96ad (patch) | |
tree | 535598b3951a2794a6531e2c6aff8acf6d56bddd /moses/InputPath.h | |
parent | 2da41f7a56cd356eac2f20e9f714b7fac6f7bbde (diff) |
starting placeholder
Diffstat (limited to 'moses/InputPath.h')
-rw-r--r-- | moses/InputPath.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/moses/InputPath.h b/moses/InputPath.h index 934b0fcbe..cce55489a 100644 --- a/moses/InputPath.h +++ b/moses/InputPath.h @@ -33,6 +33,11 @@ protected: const ScoreComponentCollection *m_inputScore; std::map<const PhraseDictionary*, std::pair<const TargetPhraseCollection*, const void*> > m_targetPhrases; + // make a copy of the target phrase collection, rather than using the 1 given by the phrase dictionary + // must clean up yourself. + // used when pruning during placeholder processing + std::vector<const TargetPhraseCollection*> m_copiedSet; + public: explicit InputPath() : m_prevNode(NULL) @@ -56,11 +61,10 @@ public: void SetTargetPhrases(const PhraseDictionary &phraseDictionary , const TargetPhraseCollection *targetPhrases - , const void *ptNode) { - std::pair<const TargetPhraseCollection*, const void*> value(targetPhrases, ptNode); - m_targetPhrases[&phraseDictionary] = value; - } + , const void *ptNode); const TargetPhraseCollection *GetTargetPhrases(const PhraseDictionary &phraseDictionary) const; + + // pointer to internal node in phrase-table. Since this is implementation dependent, this is a void* const void *GetPtNode(const PhraseDictionary &phraseDictionary) const; const ScoreComponentCollection *GetInputScore() const { return m_inputScore; |