diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-11-11 20:31:56 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-11-11 20:31:56 +0000 |
commit | d94b8d0690249624a8f6a427df9c7edad354e333 (patch) | |
tree | 87a09d7cb486aaa52fc04606d38b77983ce2013f /decoder/ff_klm.h | |
parent | 3204a77dfd5bff0b5c6d12a272ec939a882c7697 (diff) |
klm stub
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@711 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_klm.h')
-rw-r--r-- | decoder/ff_klm.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/decoder/ff_klm.h b/decoder/ff_klm.h new file mode 100644 index 00000000..0569286f --- /dev/null +++ b/decoder/ff_klm.h @@ -0,0 +1,32 @@ +#ifndef _KLM_FF_H_ +#define _KLM_FF_H_ + +#include <vector> +#include <string> + +#include "ff.h" + +struct KLanguageModelImpl; + +class KLanguageModel : public FeatureFunction { + public: + // param = "filename.lm [-o n]" + KLanguageModel(const std::string& param); + ~KLanguageModel(); + virtual void FinalTraversalFeatures(const void* context, + SparseVector<double>* features) const; + static std::string usage(bool param,bool verbose); + Features features() const; + protected: + virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, + const Hypergraph::Edge& edge, + const std::vector<const void*>& ant_contexts, + SparseVector<double>* features, + SparseVector<double>* estimated_features, + void* out_context) const; + private: + int fid_; // conceptually const; mutable only to simplify constructor + KLanguageModelImpl* pimpl_; +}; + +#endif |