#include #include "ff.h" #include "ff_basic.h" #include "ff_context.h" #include "ff_spans.h" #include "ff_lm.h" #include "ff_klm.h" #include "ff_ngrams.h" #include "ff_csplit.h" #include "ff_wordalign.h" #include "ff_tagger.h" #include "ff_factory.h" #include "ff_rules.h" #include "ff_ruleshape.h" #include "ff_bleu.h" #include "ff_soft_syntax.h" #include "ff_soft_syntax_mindist.h" #include "ff_source_path.h" #include "ff_parse_match.h" #include "ff_source_syntax.h" #include "ff_source_syntax2.h" #include "ff_register.h" #include "ff_charset.h" #include "ff_wordset.h" #include "ff_dwarf.h" #include "ff_external.h" #ifdef HAVE_GLC #include #endif void register_feature_functions() { static bool registered = false; if (registered) { assert(!"register_feature_functions() called twice!"); } registered = true; RegisterFF(); RegisterFF(); RegisterFF(); RegisterFF(); RegisterFF(); //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("SpanFeatures", new FFFactory()); ff_registry.Register("NgramFeatures", new FFFactory()); ff_registry.Register("RuleContextFeatures", new FFFactory()); ff_registry.Register("RuleIdentityFeatures", new FFFactory()); ff_registry.Register("ParseMatchFeatures", new FFFactory); ff_registry.Register("SoftSyntaxFeatures", new FFFactory); ff_registry.Register("SoftSyntaxFeaturesMindist", new FFFactory); ff_registry.Register("SourceSyntaxFeatures", new FFFactory); ff_registry.Register("SourceSpanSizeFeatures", new FFFactory); ff_registry.Register("SourceSyntaxFeatures2", new FFFactory); ff_registry.Register("CMR2008ReorderingFeatures", new FFFactory()); ff_registry.Register("RuleSourceBigramFeatures", new FFFactory()); ff_registry.Register("RuleTargetBigramFeatures", new FFFactory()); ff_registry.Register("KLanguageModel", new KLanguageModelFactory()); ff_registry.Register("NonLatinCount", new FFFactory); ff_registry.Register("RuleShape", new FFFactory); ff_registry.Register("RelativeSentencePosition", new FFFactory); ff_registry.Register("LexNullJump", new FFFactory); ff_registry.Register("NewJump", new FFFactory); ff_registry.Register("SourceBigram", new FFFactory); ff_registry.Register("Fertility", new FFFactory); ff_registry.Register("BlunsomSynchronousParseHack", new FFFactory); ff_registry.Register("CSplit_BasicFeatures", new FFFactory); ff_registry.Register("CSplit_ReverseCharLM", new FFFactory); ff_registry.Register("Tagger_BigramIndicator", new FFFactory); ff_registry.Register("LexicalPairIndicator", new FFFactory); ff_registry.Register("OutputIndicator", new FFFactory); ff_registry.Register("IdentityCycleDetector", new FFFactory); ff_registry.Register("InputIndicator", new FFFactory); ff_registry.Register("LexicalTranslationTrigger", new FFFactory); ff_registry.Register("WordPairFeatures", new FFFactory); ff_registry.Register("SourcePathFeatures", new FFFactory); ff_registry.Register("WordSet", new FFFactory); ff_registry.Register("Dwarf", new FFFactory); ff_registry.Register("External", new FFFactory); #ifdef HAVE_GLC ff_registry.Register("ContextCRF", new FFFactory); #endif }