summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-08 19:32:26 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-08 19:32:26 +0000
commit698f7aec1a97613fffc5e4a7f50d58d9641fd0fb (patch)
tree12ecf4ba11e56332cd1b4a1d4fbf497d651beb1f
parent0025cd84f93ed8e01a9b7fd4f2ce45d80ba2bf5a (diff)
compile
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@188 ec762483-ff6d-05da-a07a-a48fb63a330f
-rw-r--r--decoder/cdec_ff.cc3
-rw-r--r--decoder/viterbi.cc4
2 files changed, 4 insertions, 3 deletions
diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc
index 3b83bab3..8cf2f2fd 100644
--- a/decoder/cdec_ff.cc
+++ b/decoder/cdec_ff.cc
@@ -11,7 +11,8 @@
boost::shared_ptr<FFRegistry> global_ff_registry;
void register_feature_functions() {
- global_ff_registry->Register("LanguageModel", new FFFactory<LanguageModel>);
+ global_ff_registry->Register(new FFFactory<LanguageModel>);
+ //TODO: define usage(false,false) for each of the below
#ifdef HAVE_RANDLM
global_ff_registry->Register("RandLM", new FFFactory<LanguageModelRandLM>);
#endif
diff --git a/decoder/viterbi.cc b/decoder/viterbi.cc
index ea0cd95e..f11b77ec 100644
--- a/decoder/viterbi.cc
+++ b/decoder/viterbi.cc
@@ -124,12 +124,12 @@ FeatureVector ViterbiFeatures(Hypergraph const& hg,FeatureWeights const* weights
double fv=r.dot(*weights);
const double EPSILON=1e-5;
if (!close_enough(logp,fv,EPSILON)) {
- complaint="ViterbiFeatures log prob disagrees with features.dot(weights)"+boost::lexical_cast<string>(logp)+"!="+boost::lexical_cast<string>(fv);
+ string complaint="ViterbiFeatures log prob disagrees with features.dot(weights)"+boost::lexical_cast<string>(logp)+"!="+boost::lexical_cast<string>(fv);
if (fatal_dotprod_disagreement)
throw std::runtime_error(complaint);
else
cerr<<complaint<<endl;
-
+ }
}
return r;
}