diff options
author | Wu, Ke <wuke@cs.umd.edu> | 2014-12-11 18:52:47 -0500 |
---|---|---|
committer | Wu, Ke <wuke@cs.umd.edu> | 2014-12-11 18:52:47 -0500 |
commit | f30a8ff91bb311aba63d7a44d707af25daf8ace7 (patch) | |
tree | 113e4c80a4cda2952d28e30c1388223fd59f53d7 /decoder/ff_soft_syn.h | |
parent | 09e9a08a69401a47b9494312fa073db86b50cccf (diff) | |
parent | 99a1107282cfb6e81e1781e0b0af35379615e306 (diff) |
Merge branch 'softsyn' into softsyn_2
Diffstat (limited to 'decoder/ff_soft_syn.h')
-rw-r--r-- | decoder/ff_soft_syn.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/decoder/ff_soft_syn.h b/decoder/ff_soft_syn.h new file mode 100644 index 00000000..df9a6cc8 --- /dev/null +++ b/decoder/ff_soft_syn.h @@ -0,0 +1,38 @@ +/* + * ff_soft_syn.h + * + */ + +#ifndef FF_SOFT_SYN_H_ +#define FF_SOFT_SYN_H_ + +#include "ff_factory.h" +#include "ff.h" + +struct SoftSynFeatureImpl; + +class SoftSynFeature : public FeatureFunction { + public: + SoftSynFeature(std::string param); + ~SoftSynFeature(); + static std::string usage(bool param, bool verbose); + + protected: + virtual void PrepareForInput(const SentenceMetadata& smeta); + + virtual void TraversalFeaturesImpl( + const SentenceMetadata& smeta, const HG::Edge& edge, + const std::vector<const void*>& ant_contexts, + SparseVector<double>* features, SparseVector<double>* estimated_features, + void* out_context) const; + + private: + SoftSynFeatureImpl* pimpl_; +}; + +struct SoftSynFeatureFactory : public FactoryBase<FeatureFunction> { + FP Create(std::string param) const; + std::string usage(bool params, bool verbose) const; +}; + +#endif /* FF_SOFT_SYN_H_ */ |