summaryrefslogtreecommitdiff
path: root/decoder/decoder.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-03-29 23:05:40 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-03-29 23:05:40 -0400
commit52266126fe5ca630108c0c3bc0896b353bbfc530 (patch)
treef8cd92104279ad05dda870e64582a5e7b1dc40cd /decoder/decoder.cc
parent7a37455da0b3af1c7cde54f423d9d29d0d15c2a3 (diff)
dynasearch neighborhood option instead of default partition
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r--decoder/decoder.cc5
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) {