#include #include "ff.h" #include "ff_lm.h" #include "ff_csplit.h" #include "ff_wordalign.h" #include "ff_tagger.h" #include "ff_factory.h" #include "ff_ruleshape.h" #include "ff_bleu.h" #include "ff_lm_fsa.h" #include "ff_sample_fsa.h" #include "ff_register.h" void register_feature_functions() { static bool registered = false; if (registered) { assert(!"register_feature_functions() called twice!"); } registered = true; //TODO: these are worthless example target FSA ffs. remove later RegisterFsaImpl(true); RegisterFsaImpl(true); RegisterFsaImpl(true); // ff_registry.Register("LanguageModelFsaDynamic",new FFFactory > >); // to test correctness of FsaFeatureFunctionDynamic erasure RegisterFsaDynToFF(); RegisterFsaImpl(true); // same as LM but using fsa wrapper RegisterFsaDynToFF(); RegisterFF(); RegisterFF(); RegisterFF(); RegisterFF(); RegisterFF(); ff_registry.Register(new FFFactory); // 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); #endif ff_registry.Register("RuleShape", new FFFactory); ff_registry.Register("RelativeSentencePosition", new FFFactory); ff_registry.Register("Model2BinaryFeatures", new FFFactory); ff_registry.Register("MarkovJump", new FFFactory); ff_registry.Register("MarkovJumpFClass", new FFFactory); ff_registry.Register("SourceBigram", new FFFactory); ff_registry.Register("SourcePOSBigram", new FFFactory); ff_registry.Register("BlunsomSynchronousParseHack", new FFFactory); ff_registry.Register("AlignerResults", new FFFactory); ff_registry.Register("CSplit_BasicFeatures", new FFFactory); ff_registry.Register("CSplit_ReverseCharLM", new FFFactory); ff_registry.Register("Tagger_BigramIdentity", new FFFactory); ff_registry.Register("LexicalPairIdentity", new FFFactory); ff_registry.Register("LexicalTranslationTrigger", new FFFactory); }