summaryrefslogtreecommitdiff
path: root/decoder/kbest.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2010-12-10 13:00:04 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2010-12-10 13:00:04 -0500
commitb8f314dddda3d440164e4772830e3c951ba06ee4 (patch)
tree794e70c9b2492181618c2226a199bd6f0b447feb /decoder/kbest.h
parentd53b676548531af8f20a000b10d25f4fcaa811b3 (diff)
extract kbest alignments
Diffstat (limited to 'decoder/kbest.h')
-rw-r--r--decoder/kbest.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/decoder/kbest.h b/decoder/kbest.h
index 3eb8707b..03a8311c 100644
--- a/decoder/kbest.h
+++ b/decoder/kbest.h
@@ -12,9 +12,9 @@
namespace KBest {
// default, don't filter any derivations from the k-best list
+ template<typename Dummy>
struct NoFilter {
- bool operator()(const std::vector<WordID>& yield) {
- (void) yield;
+ bool operator()(const Dummy&) {
return false;
}
};
@@ -32,7 +32,7 @@ namespace KBest {
// the lazy k-best algorithm (Algorithm 3) from Huang and Chiang (IWPT 2005)
template<typename T, // yield type (returned by Traversal)
typename Traversal,
- typename DerivationFilter = NoFilter,
+ typename DerivationFilter = NoFilter<T>,
typename WeightType = prob_t,
typename WeightFunction = EdgeProb>
struct KBestDerivations {