summaryrefslogtreecommitdiff
path: root/decoder/ff_klm.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2010-12-23 14:50:41 -0600
committerChris Dyer <cdyer@cs.cmu.edu>2010-12-23 14:50:41 -0600
commit1ffcac39647bdc13e6f6ef73ade6b88d59a08101 (patch)
tree0454153c2b5cd92d28318f834760283b0d03c237 /decoder/ff_klm.h
parent68012b3700117bd21e8d62b6e5006ac25ac772c8 (diff)
support different types in kenlm
Diffstat (limited to 'decoder/ff_klm.h')
-rw-r--r--decoder/ff_klm.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/decoder/ff_klm.h b/decoder/ff_klm.h
index 0569286f..95e1e897 100644
--- a/decoder/ff_klm.h
+++ b/decoder/ff_klm.h
@@ -5,9 +5,13 @@
#include <string>
#include "ff.h"
+#include "lm/model.hh"
-struct KLanguageModelImpl;
+template <class Model> struct KLanguageModelImpl;
+// the supported template types are instantiated explicitly
+// in ff_klm.cc.
+template <class Model>
class KLanguageModel : public FeatureFunction {
public:
// param = "filename.lm [-o n]"
@@ -26,7 +30,7 @@ class KLanguageModel : public FeatureFunction {
void* out_context) const;
private:
int fid_; // conceptually const; mutable only to simplify constructor
- KLanguageModelImpl* pimpl_;
+ KLanguageModelImpl<Model>* pimpl_;
};
#endif