summaryrefslogtreecommitdiff
path: root/decoder/cdec_ff.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
commit7ba6dfa8cc30eab0e5317c9ec4c7bee7ce5e507d (patch)
tree294201cb4b609fca8053ea0e248b34bce39f73da /decoder/cdec_ff.cc
parenta4ed52197aa329a0d21b2ca2c258196418c5bcc8 (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/cdec_ff.cc')
-rw-r--r--decoder/cdec_ff.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc
index 1ef50eb1..98d4711f 100644
--- a/decoder/cdec_ff.cc
+++ b/decoder/cdec_ff.cc
@@ -13,21 +13,23 @@
#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
+ //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>();
RegisterFF<SourceWordPenalty>();
RegisterFF<ArityPenalty>();
RegisterFF<BLEUModel>();
- //TODO: worthless example target FSA ffs. remove later
ff_registry.Register(new FFFactory<WordPenaltyFromFsa>); // same as WordPenalty, but implemented using ff_fsa
- ff_registry.Register(new FFFactory<FeatureFunctionFromFsa<ShorterThanPrev> >);
//TODO: use for all features the new Register which requires static FF::usage(false,false) give name
#ifdef HAVE_RANDLM