summaryrefslogtreecommitdiff
path: root/decoder/cdec_ff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/cdec_ff.cc')
-rw-r--r--decoder/cdec_ff.cc16
1 files changed, 3 insertions, 13 deletions
diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc
index 588842f1..4ce5749e 100644
--- a/decoder/cdec_ff.cc
+++ b/decoder/cdec_ff.cc
@@ -12,8 +12,7 @@
#include "ff_rules.h"
#include "ff_ruleshape.h"
#include "ff_bleu.h"
-#include "ff_lm_fsa.h"
-#include "ff_sample_fsa.h"
+#include "ff_source_syntax.h"
#include "ff_register.h"
#include "ff_charset.h"
#include "ff_wordset.h"
@@ -30,15 +29,6 @@ void register_feature_functions() {
}
registered = true;
- //TODO: these are worthless example target FSA ffs. remove later
- RegisterFsaImpl<SameFirstLetter>(true);
- RegisterFsaImpl<LongerThanPrev>(true);
- RegisterFsaImpl<ShorterThanPrev>(true);
-// ff_registry.Register("LanguageModelFsaDynamic",new FFFactory<FeatureFunctionFromFsa<FsaFeatureFunctionDynamic<LanguageModelFsa> > >); // to test correctness of FsaFeatureFunctionDynamic erasure
- RegisterFsaDynToFF<LanguageModelFsa>();
- RegisterFsaImpl<LanguageModelFsa>(true); // same as LM but using fsa wrapper
- RegisterFsaDynToFF<SameFirstLetter>();
-
RegisterFF<LanguageModel>();
RegisterFF<WordPenalty>();
@@ -46,8 +36,6 @@ void register_feature_functions() {
RegisterFF<ArityPenalty>();
RegisterFF<BLEUModel>();
- ff_registry.Register(new FFFactory<WordPenaltyFromFsa>); // same as WordPenalty, but implemented using ff_fsa
-
//TODO: use for all features the new Register which requires static FF::usage(false,false) give name
#ifdef HAVE_RANDLM
ff_registry.Register("RandLM", new FFFactory<LanguageModelRandLM>);
@@ -55,6 +43,8 @@ void register_feature_functions() {
ff_registry.Register("SpanFeatures", new FFFactory<SpanFeatures>());
ff_registry.Register("NgramFeatures", new FFFactory<NgramDetector>());
ff_registry.Register("RuleIdentityFeatures", new FFFactory<RuleIdentityFeatures>());
+ ff_registry.Register("SourceSyntaxFeatures", new FFFactory<SourceSyntaxFeatures>);
+ ff_registry.Register("SourceSpanSizeFeatures", new FFFactory<SourceSpanSizeFeatures>);
ff_registry.Register("RuleNgramFeatures", new FFFactory<RuleNgramFeatures>());
ff_registry.Register("CMR2008ReorderingFeatures", new FFFactory<CMR2008ReorderingFeatures>());
ff_registry.Register("KLanguageModel", new KLanguageModelFactory());