diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-30 01:01:56 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-30 01:01:56 -0400 |
commit | 302c5a9de27469e7b6fe44f7093619e04314e719 (patch) | |
tree | e082b6c2f2da4964a9d74f1f041b0389afadc1f8 /decoder/ff_wordalign.cc | |
parent | cf192109de3919e6e53d21c516531aa0d1018b5e (diff) |
small fix for dynasearch neighborhoods
Diffstat (limited to 'decoder/ff_wordalign.cc')
-rw-r--r-- | decoder/ff_wordalign.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/decoder/ff_wordalign.cc b/decoder/ff_wordalign.cc index cdb8662a..9e7c618e 100644 --- a/decoder/ff_wordalign.cc +++ b/decoder/ff_wordalign.cc @@ -373,6 +373,11 @@ void SourceBigram::TraversalFeaturesImpl(const SentenceMetadata& smeta, out_word_count = edge.rule_->EWords(); assert(out_word_count == 1); // this is only defined for lex translation! // revisit this if you want to translate into null words + } else if (arity == 1) { + WordID left = *static_cast<const WordID*>(ant_contexts[0]); + int left_wc = *(static_cast<const int*>(ant_contexts[0]) + 1); + out_context = left; + out_word_count = left_wc; } else if (arity == 2) { WordID left = *static_cast<const WordID*>(ant_contexts[0]); WordID right = *static_cast<const WordID*>(ant_contexts[1]); |