diff options
author | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-15 00:34:58 +0000 |
---|---|---|
committer | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-15 00:34:58 +0000 |
commit | 3ca6d4b4bbbd0401ab25e7731ce84afb118635d8 (patch) | |
tree | 6ce51c1d8fef8ebbd0649b946dd983950295cc25 /extools/sentence_pair.h | |
parent | 1350b8e8e465acc9d4d8d43d807cc6093e8f37b9 (diff) |
Massacred the pipeline to support source language phrases and contexts.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@255 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'extools/sentence_pair.h')
-rw-r--r-- | extools/sentence_pair.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/extools/sentence_pair.h b/extools/sentence_pair.h index d78be359..b5a7ca93 100644 --- a/extools/sentence_pair.h +++ b/extools/sentence_pair.h @@ -1,8 +1,10 @@ #ifndef _SENTENCE_PAIR_H_ #define _SENTENCE_PAIR_H_ +#include <map> #include <utility> #include <vector> +#include <boost/tuple/tuple.hpp> #include "wordid.h" #include "array2d.h" @@ -22,12 +24,12 @@ struct AnnotatedParallelSentence { std::vector<std::vector<std::pair<short, short> > > aligns_by_fword; // span type information - Array2D<std::vector<WordID> > span_types; // span_types(i,j) is the list of category - // types for a span (i,j) in the TARGET language. + std::map< boost::tuple<short,short,short,short>, std::vector<WordID> > span_types; + // span_types(i,j,k,l) is the list of category span (i,j) in source and (k,l) in the target language. int f_len, e_len; - static int ReadAlignmentPoint(const char* buf, int start, int end, bool permit_col, short* a, short* b); + static int ReadAlignmentPoint(const char* buf, int start, int end, bool permit_col, short* a, short* b, short* c, short* d); private: void Reset(); |