diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-08 19:21:02 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-08 19:21:02 +0000 |
commit | 52a8d49e81c14b6f7ed3afb5bdb50b17391995a8 (patch) | |
tree | 2cd84e2840204de6fbfaa70be5b2818b9c805b51 /decoder/ff_factory.h | |
parent | 71b39bcf60182d1686966db34225a670d13e3594 (diff) |
actually use -n feature_name in LanguageModel. FF factory usage facility, FF feature ids facility (not used yet)
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@186 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_factory.h')
-rw-r--r-- | decoder/ff_factory.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/decoder/ff_factory.h b/decoder/ff_factory.h index bc586567..75911f38 100644 --- a/decoder/ff_factory.h +++ b/decoder/ff_factory.h @@ -17,8 +17,10 @@ class FFRegistry { friend class FFFactoryBase; public: boost::shared_ptr<FeatureFunction> Create(const std::string& ffname, const std::string& param) const; + std::string usage(std::string const& ffname,bool params=true,bool verbose=true) const; void DisplayList() const; void Register(const std::string& ffname, FFFactoryBase* factory); + void Register(FFFactoryBase* factory); private: FFRegistry() {} std::map<std::string, boost::shared_ptr<FFFactoryBase> > reg_; @@ -27,6 +29,7 @@ class FFRegistry { struct FFFactoryBase { virtual ~FFFactoryBase(); virtual boost::shared_ptr<FeatureFunction> Create(const std::string& param) const = 0; + virtual std::string usage(bool params,bool verbose) const = 0; }; template<class FF> @@ -34,6 +37,11 @@ class FFFactory : public FFFactoryBase { boost::shared_ptr<FeatureFunction> Create(const std::string& param) const { return boost::shared_ptr<FeatureFunction>(new FF(param)); } + // called with false,false just gives feature name + virtual std::string usage(bool params,bool verbose) const { + return FF::usage(params,verbose); + } + }; #endif |