diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-06-28 16:21:04 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-06-28 16:21:04 +0400 |
commit | fd1a70739ff7e5bb771156d869bb59148f137ba6 (patch) | |
tree | 132ceb368e2f66e0a51e879311f01615196e0680 /moses/TranslationOptionCollectionText.h | |
parent | c963338476a40d5b1071c0c253332ed6ebd0b427 (diff) |
create matrix of subphrases in class TranslationOptionCollectionText
Diffstat (limited to 'moses/TranslationOptionCollectionText.h')
-rw-r--r-- | moses/TranslationOptionCollectionText.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/moses/TranslationOptionCollectionText.h b/moses/TranslationOptionCollectionText.h index 09e1d78c0..9a9f6a0c0 100644 --- a/moses/TranslationOptionCollectionText.h +++ b/moses/TranslationOptionCollectionText.h @@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #define moses_TranslationOptionCollectionText_h #include "TranslationOptionCollection.h" +#include <map> +#include <vector> namespace Moses { @@ -35,9 +37,17 @@ class Sentence; class TranslationOptionCollectionText : public TranslationOptionCollection { public: + typedef std::vector< std::vector<InputLatticeNode> > TargetPhraseMatrix; + +protected: + TargetPhraseMatrix m_targetPhrasesfromPt; /*< contains translation options */ + + InputLatticeNode &GetInputLatticeNode(size_t startPos, size_t endPos); + +public: void ProcessUnknownWord(size_t sourcePos); - TranslationOptionCollectionText(Sentence const& inputSentence, size_t maxNoTransOptPerCoverage, float translationOptionThreshold); + TranslationOptionCollectionText(Sentence const& input, size_t maxNoTransOptPerCoverage, float translationOptionThreshold); bool HasXmlOptionsOverlappingRange(size_t startPosition, size_t endPosition) const; |