From 2a18010e255810cc2b5bcbe688f3db8eabda23ca Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 6 Dec 2009 22:25:25 -0500 Subject: add compound splitting logic and features (Dyer 2008, NAACL) --- src/ff_csplit.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/ff_csplit.h (limited to 'src/ff_csplit.h') diff --git a/src/ff_csplit.h b/src/ff_csplit.h new file mode 100644 index 00000000..c1cfb64b --- /dev/null +++ b/src/ff_csplit.h @@ -0,0 +1,39 @@ +#ifndef _FF_CSPLIT_H_ +#define _FF_CSPLIT_H_ + +#include + +#include "ff.h" + +class BasicCSplitFeaturesImpl; +class BasicCSplitFeatures : public FeatureFunction { + public: + BasicCSplitFeatures(const std::string& param); + protected: + virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, + const Hypergraph::Edge& edge, + const std::vector& ant_contexts, + SparseVector* features, + SparseVector* estimated_features, + void* out_context) const; + private: + boost::shared_ptr pimpl_; +}; + +class ReverseCharLMCSplitFeatureImpl; +class ReverseCharLMCSplitFeature : public FeatureFunction { + public: + ReverseCharLMCSplitFeature(const std::string& param); + protected: + virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, + const Hypergraph::Edge& edge, + const std::vector& ant_contexts, + SparseVector* features, + SparseVector* estimated_features, + void* out_context) const; + private: + boost::shared_ptr pimpl_; + const int fid_; +}; + +#endif -- cgit v1.2.3