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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/*
* 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;
};
struct SoftKBestSynFeatureImpl;
class SoftKBestSynFeature : public FeatureFunction {
public:
SoftKBestSynFeature(std::string param);
~SoftKBestSynFeature();
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:
SoftKBestSynFeatureImpl* pimpl_;
};
struct SoftKBestSynFeatureFactory : public FactoryBase<FeatureFunction> {
FP Create(std::string param) const;
std::string usage(bool params, bool verbose) const;
};
struct SoftForestSynFeatureImpl;
class SoftForestSynFeature : public FeatureFunction {
public:
SoftForestSynFeature(std::string param);
~SoftForestSynFeature();
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:
SoftForestSynFeatureImpl* pimpl_;
};
struct SoftForestSynFeatureFactory : public FactoryBase<FeatureFunction> {
FP Create(std::string param) const;
std::string usage(bool params, bool verbose) const;
};
#endif /* FF_SOFT_SYN_H_ */
|