blob: 6ed35768f5279f1d3ce621224a13ff3af1cf8985 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/*
* ff_const_reorder.h
*
* Created on: Jul 11, 2013
* Author: junhuili
*/
#ifndef FF_CONST_REORDER_H_
#define FF_CONST_REORDER_H_
#include "ff_factory.h"
#include "ff.h"
struct ConstReorderFeatureImpl;
class ConstReorderFeature : public FeatureFunction {
public:
// param = "filename n"
ConstReorderFeature(const std::string& param);
~ConstReorderFeature();
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:
ConstReorderFeatureImpl* pimpl_;
};
struct ConstReorderFeatureFactory : public FactoryBase<FeatureFunction> {
FP Create(std::string param) const;
std::string usage(bool params, bool verbose) const;
};
#endif /* FF_CONST_REORDER_H_ */
|