summaryrefslogtreecommitdiff
path: root/decoder/apply_fsa_models.cc
diff options
context:
space:
mode:
authorgraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-07 08:35:19 +0000
committergraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-07 08:35:19 +0000
commit78a5f4297dcfce6c4a904322c2e989b612a6105a (patch)
tree245edf663fc1e7b9b9486da42d6a78c6196f401c /decoder/apply_fsa_models.cc
parent7da354b48459db5ad22120b4fcb38f5c7db468ed (diff)
cdec -A "LanguageModelFsa lm.gz" works
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@490 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/apply_fsa_models.cc')
-rwxr-xr-xdecoder/apply_fsa_models.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/apply_fsa_models.cc b/decoder/apply_fsa_models.cc
index 27773b0d..01de62d3 100755
--- a/decoder/apply_fsa_models.cc
+++ b/decoder/apply_fsa_models.cc
@@ -1,6 +1,7 @@
#include "apply_fsa_models.h"
#include "hg.h"
#include "ff_fsa_dynamic.h"
+#include "ff_from_fsa.h"
#include "feature_vector.h"
#include "stringlib.h"
#include "apply_models.h"
@@ -27,7 +28,9 @@ struct ApplyFsa {
}
void ApplyBottomUp() {
assert(cfg.IsBottomUp());
- vector<const FeatureFunction*> ffs;
+ FeatureFunctionFromFsa<FsaFeatureFunctionFwd> buff(&fsa);
+ buff.Init(); // mandatory to call this (normally factory would do it)
+ vector<const FeatureFunction*> ffs(1,&buff);
ModelSet models(weights, ffs);
IntersectionConfiguration i(cfg.BottomUpAlgorithm(),cfg.pop_limit);
ApplyModelSet(ih,smeta,models,i,oh);