diff options
author | Patrick Simianer <p@simianer.de> | 2011-10-19 14:02:34 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2011-10-19 14:02:34 +0200 |
commit | eb14e36d0b29f19321d44dd7dfa73cc703838d86 (patch) | |
tree | 1285e9e56959bc3a4b506e36bbc3b49f4e938fa0 /decoder/ff_register.h | |
parent | 68f158b11df9f4072699fe6a4c8022ea54102b28 (diff) | |
parent | 04e38a57b19ea012895ac2efb39382c2e77833a9 (diff) |
merge upstream/master
Diffstat (limited to 'decoder/ff_register.h')
-rwxr-xr-x | decoder/ff_register.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/decoder/ff_register.h b/decoder/ff_register.h index eff23537..80b1457e 100755 --- a/decoder/ff_register.h +++ b/decoder/ff_register.h @@ -2,50 +2,12 @@ #define FF_FSA_REGISTER_H #include "ff_factory.h" -#include "ff_from_fsa.h" -#include "ff_fsa_dynamic.h" - -inline std::string prefix_fsa(std::string const& name,bool fsa_prefix_ff) { - return fsa_prefix_ff ? "Fsa"+name : name; -} - -//FIXME: problem with FeatureFunctionFromFsa<FsaFeatureFunction> - need to use factory rather than ctor. -#if 0 -template <class DynFsa> -inline void RegisterFsa(bool ff_also=true,bool fsa_prefix_ff=true) { - assert(!ff_also); -// global_fsa_ff_registry->RegisterFsa<DynFsa>(); -//if (ff_also) ff_registry.RegisterFF<FeatureFunctionFromFsa<DynFsa> >(prefix_fsa(DynFsa::usage(false,false)),fsa_prefix_ff); -} -#endif - -//TODO: ff from fsa that uses pointer to fsa impl? e.g. in LanguageModel we share underlying lm file by recognizing same param, but without that effort, otherwise stateful ff may duplicate state if we enable both fsa and ff_from_fsa -template <class FsaImpl> -inline void RegisterFsaImpl(bool ff_also=true,bool fsa_prefix_ff=false) { - typedef FsaFeatureFunctionDynamic<FsaImpl> DynFsa; - typedef FeatureFunctionFromFsa<FsaImpl> FFFrom; - std::string name=FsaImpl::usage(false,false); - fsa_ff_registry.Register(new FsaFactory<DynFsa>); - if (ff_also) - ff_registry.Register(prefix_fsa(name,fsa_prefix_ff),new FFFactory<FFFrom>); -} template <class Impl> inline void RegisterFF() { ff_registry.Register(new FFFactory<Impl>); } -template <class FsaImpl> -inline void RegisterFsaDynToFF(std::string name,bool prefix=true) { - typedef FsaFeatureFunctionDynamic<FsaImpl> DynFsa; - ff_registry.Register(prefix?"DynamicFsa"+name:name,new FFFactory<FeatureFunctionFromFsa<DynFsa> >); -} - -template <class FsaImpl> -inline void RegisterFsaDynToFF(bool prefix=true) { - RegisterFsaDynToFF<FsaImpl>(FsaImpl::usage(false,false),prefix); -} - void register_feature_functions(); #endif |