summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mira/kbest_mira.cc2
-rw-r--r--utils/dict.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/mira/kbest_mira.cc b/mira/kbest_mira.cc
index 9d83c94a..dc0200d6 100644
--- a/mira/kbest_mira.cc
+++ b/mira/kbest_mira.cc
@@ -218,7 +218,7 @@ int main(int argc, char** argv) {
Weights::InitSparseVector(dense_weights, &lambdas);
const double max_step_size = conf["max_step_size"].as<double>();
- const double mt_metric_scale = 1.0;//conf["mt_metric_scale"].as<double>();
+ const double mt_metric_scale = conf["mt_metric_scale"].as<double>();
assert(corpus.size() > 0);
vector<GoodBadOracle> oracles(corpus.size());
diff --git a/utils/dict.h b/utils/dict.h
index 595e4f9f..5fd6412c 100644
--- a/utils/dict.h
+++ b/utils/dict.h
@@ -3,7 +3,6 @@
#include <cassert>
#include <cstring>
-
#include <string>
#include <vector>
#include "hash.h"
@@ -73,7 +72,6 @@ class Dict {
inline const std::string& Convert(const WordID& id) const {
if (id == 0) return b0_;
assert(id <= (int)words_.size());
- if (id < 0 || id > (int)words_.size()) return b0_;
return words_[id-1];
}