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
commitd4907ddee2012dce728bd1a6eb4e6cad452a54b2 (patch)
treed8730fb06078dff0a39b432f1761fb6f1631a509 /decoder/ff_klm.h
parent61116d4ce5f6a3ea9ae1c4d5a5b97a954d486597 (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