summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-03-06 17:59:01 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-03-06 17:59:01 -0500
commitd695ee6573ad3b37952ef930b1608c9227dfe6f7 (patch)
treef48f735d3a2288e2535c239027513c0a4861146a
parent8f39316aa31ba72226736593c5529a9c60c3b0d0 (diff)
print word alignments in rule
-rw-r--r--decoder/trule.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/decoder/trule.cc b/decoder/trule.cc
index eedf8f30..9820e6d5 100644
--- a/decoder/trule.cc
+++ b/decoder/trule.cc
@@ -272,6 +272,11 @@ string TRule::AsString(bool verbose) const {
}
if (!scores_.empty() && verbose) {
os << " ||| " << scores_;
+ if (!a_.empty()) {
+ os << " |||";
+ for (int i = 0; i < a_.size(); ++i)
+ os << ' ' << a_[i];
+ }
}
return os.str();
}