diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-07-02 02:27:13 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-07-02 02:27:13 +0400 |
commit | 8123772b434f7051683bfd2b88284ccaded7287a (patch) | |
tree | baaf40d2ab794d6b007a8b87f89340ed6bad0e2f /moses/TranslationOptionCollection.h | |
parent | 65b6429d84b2ac9ed8d0a6c7a3f8b01d8b622aae (diff) |
separate class InputLatticeNode into seprate file
Diffstat (limited to 'moses/TranslationOptionCollection.h')
-rw-r--r-- | moses/TranslationOptionCollection.h | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/moses/TranslationOptionCollection.h b/moses/TranslationOptionCollection.h index 732e11be9..07dfaadd0 100644 --- a/moses/TranslationOptionCollection.h +++ b/moses/TranslationOptionCollection.h @@ -43,49 +43,7 @@ class FactorMask; class Word; class DecodeGraph; class PhraseDictionary; - -/** Each node contains -1. substring used to searching the phrase table -2. the source range it covers -3. a list of InputLatticeNode that it is a prefix of -This is for both sentence input, and confusion network/lattices -*/ -class InputLatticeNode -{ -protected: - const InputLatticeNode *m_prevNode; - Phrase m_phrase; - WordsRange m_range; - std::map<const PhraseDictionary*, std::pair<const TargetPhraseCollection*, void*> > m_targetPhrases; - -public: - InputLatticeNode() - : m_prevNode(NULL) - , m_range(NOT_FOUND, NOT_FOUND) - {} - InputLatticeNode(const Phrase &phrase, const WordsRange &range, const InputLatticeNode *prevNode) - :m_prevNode(prevNode) - ,m_phrase(phrase) - ,m_range(range) { - } - - const Phrase &GetPhrase() const { - return m_phrase; - } - const WordsRange &GetWordsRange() const { - return m_range; - } - - void SetTargetPhrases(const PhraseDictionary &phraseDictionary - , const TargetPhraseCollection *targetPhrases - , void *ptNode) { - std::pair<const TargetPhraseCollection*, void*> value(targetPhrases, ptNode); - m_targetPhrases[&phraseDictionary] = value; - } - const TargetPhraseCollection *GetTargetPhrases(const PhraseDictionary &phraseDictionary) const; - -}; - +class InputLatticeNode; /** Contains all phrase translations applicable to current input type (a sentence or confusion network). * A key insight into efficient decoding is that various input |