diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-29 23:05:40 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-29 23:05:40 -0400 |
commit | cf192109de3919e6e53d21c516531aa0d1018b5e (patch) | |
tree | a99f8bac42376f7fd926a3ce8c966b8dcbaa0e81 /decoder/decoder.cc | |
parent | fc17a75cefc5d7b069a5605cb2176f7ee3ef8649 (diff) |
dynasearch neighborhood option instead of default partition
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r-- | decoder/decoder.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index fdaf8cb1..81759a12 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -421,6 +421,7 @@ DecoderImpl::DecoderImpl(po::variables_map& conf, int argc, char** argv, istream ("ctf_num_widenings", po::value<int>()->default_value(2), "Widen coarse beam this many times before backing off to full parse") ("ctf_no_exhaustive", "Do not fall back to exhaustive parse if coarse-to-fine parsing fails") ("scale_prune_srclen", "scale beams by the input length (in # of tokens; may not be what you want for lattices") + ("lextrans_dynasearch", "'DynaSearch' neighborhood instead of usual partition, as defined by Smith & Eisner (2005)") ("lextrans_use_null", "Support source-side null words in lexical translation") ("lextrans_align_only", "Only used in alignment mode. Limit target words generated by reference") ("tagger_tagset,t", po::value<string>(), "(Tagger) file containing tag set") @@ -861,6 +862,10 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { } for (int j = 0; j < in_edges.size(); ++j) forest.edges_[in_edges[j]].feature_values_.set_value(rp.fid_summary, exp(log_np)); +// Hypergraph::Edge& example_edge = forest.edges_[in_edges[0]]; +// string n = "NONE"; +// if (forest.nodes_[i].cat_) n = TD::Convert(-forest.nodes_[i].cat_); +// cerr << "[" << n << "," << example_edge.i_ << "," << example_edge.j_ << "] = " << exp(log_np) << endl; } } } else if (summary_feature_type == kEDGE_RISK) { |