diff options
author | graehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-07 08:35:19 +0000 |
---|---|---|
committer | graehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-07 08:35:19 +0000 |
commit | 78a5f4297dcfce6c4a904322c2e989b612a6105a (patch) | |
tree | 245edf663fc1e7b9b9486da42d6a78c6196f401c /decoder/ff_register.h | |
parent | 7da354b48459db5ad22120b4fcb38f5c7db468ed (diff) |
cdec -A "LanguageModelFsa lm.gz" works
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@490 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_register.h')
-rwxr-xr-x | decoder/ff_register.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/decoder/ff_register.h b/decoder/ff_register.h index f0828ca3..70e1c1c6 100755 --- a/decoder/ff_register.h +++ b/decoder/ff_register.h @@ -36,11 +36,15 @@ inline void RegisterFF() { } template <class FsaImpl> -inline void RegisterFsaDynToFF(bool prefix=true) { +inline void RegisterFsaDynToFF(std::string name,bool prefix=true) { typedef FsaFeatureFunctionDynamic<FsaImpl> DynFsa; - std::string name=FsaImpl::usage(false,false); 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); +} + #endif |