diff options
author | Chris Dyer <redpony@gmail.com> | 2014-04-25 02:01:59 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-04-25 02:01:59 -0400 |
commit | c5531cdbcecb6e902ab08c9297f16f03b829497f (patch) | |
tree | d53af807fbceda0032c5929a4b79e9d994a26fcf /decoder/trule.h | |
parent | 97ee2a6f856c211a37a1c99b031319bff7dbee1c (diff) |
support for multiple xRs states in parser (not yet in rules)
Diffstat (limited to 'decoder/trule.h')
-rw-r--r-- | decoder/trule.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/decoder/trule.h b/decoder/trule.h index 7dced5a1..cc370757 100644 --- a/decoder/trule.h +++ b/decoder/trule.h @@ -42,6 +42,9 @@ class TRule { scores_.set_value(feat_ids[i], feat_vals[i]); } + TRule(WordID lhs, const WordID* src, int src_size, const WordID* trg, int trg_size, int arity, int pi, int pj) : + e_(trg, trg + trg_size), f_(src, src + src_size), lhs_(lhs), arity_(arity), prev_i(pi), prev_j(pj) {} + bool IsGoal() const; explicit TRule(const std::vector<WordID>& e) : e_(e), lhs_(0), prev_i(-1), prev_j(-1) {} |