summaryrefslogtreecommitdiff
path: root/decoder/cdec_ff.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-07 02:24:51 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-07 02:24:51 +0000
commitaaac9f8ee73ba59b72609af9a78b167312a6dac7 (patch)
tree1273c65f43c124eac220a298acbe7af951b0a83e /decoder/cdec_ff.cc
parente2ef62dc50b9795fc801f97aba7bac8c80bb7c54 (diff)
propagation of feature name+debug from factory, return correct features array for fsa ffs
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@486 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cdec_ff.cc')
-rw-r--r--decoder/cdec_ff.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc
index 6edac126..1ef50eb1 100644
--- a/decoder/cdec_ff.cc
+++ b/decoder/cdec_ff.cc
@@ -13,8 +13,12 @@
#include "ff_register.h"
void register_feature_functions() {
+ RegisterFsaImpl<SameFirstLetter>(true,false);
+ RegisterFsaImpl<LongerThanPrev>(true,false);
RegisterFF<LanguageModel>();
RegisterFsaImpl<LanguageModelFsa>(true,false); // same as LM but using fsa wrapper
+ ff_registry.Register("LanguageModelFsaDynamic",new FFFactory<FeatureFunctionFromFsa<FsaFeatureFunctionDynamic<LanguageModelFsa> > >); // test correctness of FsaFeatureFunctionDynamic erasure
+ RegisterFsaDynToFF<SameFirstLetter>();
RegisterFF<WordPenalty>();
RegisterFF<SourceWordPenalty>();
@@ -23,8 +27,6 @@ void register_feature_functions() {
//TODO: worthless example target FSA ffs. remove later
ff_registry.Register(new FFFactory<WordPenaltyFromFsa>); // same as WordPenalty, but implemented using ff_fsa
- RegisterFsaImpl<SameFirstLetter>(true,false);
- ff_registry.Register(new FFFactory<FeatureFunctionFromFsa<LongerThanPrev> >);
ff_registry.Register(new FFFactory<FeatureFunctionFromFsa<ShorterThanPrev> >);
//TODO: use for all features the new Register which requires static FF::usage(false,false) give name