diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-08 23:27:05 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-08 23:27:05 +0000 |
commit | 402124314fb821ba7869bf3c5008d7644f9e15b4 (patch) | |
tree | b234accf2e7c31d35d19240bbac868657c5cec7d /decoder/cdec_ff.cc | |
parent | c12e7241e8908def96943b1a4056e536ea91eded (diff) |
feature functions support e.g. --usage=LanguageModel, report feature ids, warn about duplicate ids, 0-expand weight vector for no segfault, --warn_0_weight, and know their own names to simplify registration
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@192 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cdec_ff.cc')
-rw-r--r-- | decoder/cdec_ff.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc index 8cf2f2fd..077956a8 100644 --- a/decoder/cdec_ff.cc +++ b/decoder/cdec_ff.cc @@ -12,13 +12,14 @@ boost::shared_ptr<FFRegistry> global_ff_registry; void register_feature_functions() { global_ff_registry->Register(new FFFactory<LanguageModel>); - //TODO: define usage(false,false) for each of the below + + //TODO: use for all features the new Register which requires usage(...) #ifdef HAVE_RANDLM global_ff_registry->Register("RandLM", new FFFactory<LanguageModelRandLM>); #endif - global_ff_registry->Register("WordPenalty", new FFFactory<WordPenalty>); - global_ff_registry->Register("SourceWordPenalty", new FFFactory<SourceWordPenalty>); - global_ff_registry->Register("ArityPenalty", new FFFactory<ArityPenalty>); + global_ff_registry->Register(new FFFactory<WordPenalty>); + global_ff_registry->Register(new FFFactory<SourceWordPenalty>); + global_ff_registry->Register(new FFFactory<ArityPenalty>); global_ff_registry->Register("RuleShape", new FFFactory<RuleShapeFeatures>); global_ff_registry->Register("RelativeSentencePosition", new FFFactory<RelativeSentencePosition>); global_ff_registry->Register("Model2BinaryFeatures", new FFFactory<Model2BinaryFeatures>); |