summaryrefslogtreecommitdiff
path: root/decoder/trule.h
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2014-04-25 02:01:59 -0400
committerChris Dyer <redpony@gmail.com>2014-04-25 02:01:59 -0400
commit4078d043bb3d3ebc386af44f6e1af3036f0afc25 (patch)
tree3938dde9c98c9ad430d285c1c078b97f826ab3f4 /decoder/trule.h
parent2af1d21b74343b568fbb87a2a6902ee01f19636a (diff)
support for multiple xRs states in parser (not yet in rules)
Diffstat (limited to 'decoder/trule.h')
-rw-r--r--decoder/trule.h3
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) {}