diff options
author | graehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-07 08:35:19 +0000 |
---|---|---|
committer | graehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-07 08:35:19 +0000 |
commit | 78a5f4297dcfce6c4a904322c2e989b612a6105a (patch) | |
tree | 245edf663fc1e7b9b9486da42d6a78c6196f401c /decoder/apply_fsa_models.cc | |
parent | 7da354b48459db5ad22120b4fcb38f5c7db468ed (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-x | decoder/apply_fsa_models.cc | 5 |
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); |