summaryrefslogtreecommitdiff
path: root/decoder/ff_klm.cc
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-11-25 23:24:42 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-11-25 23:24:42 +0000
commit2b95390f08d9f556e6207ecff03b4b0fd5ede993 (patch)
tree7a96e837a3e28cfc8258a3c5293ac333d7c3e29e /decoder/ff_klm.cc
parent467ef6ce78cfe7341a696ebf0948e377be619ae5 (diff)
parent62a2526e69eb1570bf349763fc8bb65179337918 (diff)
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'decoder/ff_klm.cc')
-rw-r--r--decoder/ff_klm.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/ff_klm.cc b/decoder/ff_klm.cc
index c8ca917a..339a10c3 100644
--- a/decoder/ff_klm.cc
+++ b/decoder/ff_klm.cc
@@ -187,6 +187,7 @@ class KLanguageModelImpl {
// this assumes no target words on final unary -> goal rule. is that ok?
// for <s> (n-1 left words) and (n-1 right words) </s>
double FinalTraversalCost(const void* state_void, double* oovs) {
+ *oovs = 0;
const BoundaryAnnotatedState &annotated = *static_cast<const BoundaryAnnotatedState*>(state_void);
if (add_sos_eos_) { // rules do not produce <s> </s>, so do it here
assert(!annotated.seen_bos);
@@ -344,7 +345,7 @@ void KLanguageModel<Model>::TraversalFeaturesImpl(const SentenceMetadata& /* sme
const Hypergraph::Edge& edge,
const vector<const void*>& ant_states,
SparseVector<double>* features,
- SparseVector<double>* estimated_features,
+ SparseVector<double>* /*estimated_features*/,
void* state) const {
double est = 0;
double oovs = 0;