diff options
author | Chris Dyer <redpony@gmail.com> | 2009-12-04 04:15:57 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2009-12-04 04:15:57 -0500 |
commit | 69a9fd913f019e0b1b39bba8554458d2f969ad7f (patch) | |
tree | d7c668a46043f9889eeb1fec1520f498689035d6 /src/ff_lm.h | |
parent | e9c26d407ad1be9caed5f376ff7c3ae8239beddd (diff) |
rename a few files
Diffstat (limited to 'src/ff_lm.h')
-rw-r--r-- | src/ff_lm.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ff_lm.h b/src/ff_lm.h new file mode 100644 index 00000000..cd717360 --- /dev/null +++ b/src/ff_lm.h @@ -0,0 +1,32 @@ +#ifndef _LM_FF_H_ +#define _LM_FF_H_ + +#include <vector> +#include <string> + +#include "hg.h" +#include "ff.h" + +class LanguageModelImpl; + +class LanguageModel : public FeatureFunction { + public: + // param = "filename.lm [-o n]" + LanguageModel(const std::string& param); + ~LanguageModel(); + virtual void FinalTraversalFeatures(const void* context, + SparseVector<double>* features) const; + std::string DebugStateToString(const void* state) 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: + const int fid_; + mutable LanguageModelImpl* pimpl_; +}; + +#endif |