summaryrefslogtreecommitdiff
path: root/decoder/ff_source_syntax2_p.cc
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-04-29 11:01:38 +0200
committerPatrick Simianer <p@simianer.de>2013-04-29 11:01:38 +0200
commit619daa3700303b55604781645b28aa702d96b91a (patch)
tree7674142886e98a9263dee720963cd309bc84347c /decoder/ff_source_syntax2_p.cc
parent3ea6bc5eadc05b9f052e16a33a5eb96823048e88 (diff)
added (broken) variant of a feature
Diffstat (limited to 'decoder/ff_source_syntax2_p.cc')
-rw-r--r--decoder/ff_source_syntax2_p.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/decoder/ff_source_syntax2_p.cc b/decoder/ff_source_syntax2_p.cc
index 3517b87f..dfa791ea 100644
--- a/decoder/ff_source_syntax2_p.cc
+++ b/decoder/ff_source_syntax2_p.cc
@@ -15,8 +15,8 @@ using namespace std;
// source trees must be represented in Penn Treebank format, e.g.
// (S (NP John) (VP (V left)))
-struct SourceSyntaxFeatures2Impl {
- SourceSyntaxFeatures2Impl(const string& param) {
+struct PSourceSyntaxFeatures2Impl {
+ PSourceSyntaxFeatures2Impl(const string& param) {
if (param.compare("") != 0) {
string triggered_features_fn = param;
ReadFile triggered_features(triggered_features_fn);
@@ -137,17 +137,17 @@ struct SourceSyntaxFeatures2Impl {
};
-SourceSyntaxFeatures2::SourceSyntaxFeatures2(const string& param) :
+PSourceSyntaxFeatures2::PSourceSyntaxFeatures2(const string& param) :
FeatureFunction(sizeof(WordID)) {
- impl = new SourceSyntaxFeatures2Impl(param);
+ impl = new PSourceSyntaxFeatures2Impl(param);
}
-SourceSyntaxFeatures2::~SourceSyntaxFeatures2() {
+PSourceSyntaxFeatures2::~PSourceSyntaxFeatures2() {
delete impl;
impl = NULL;
}
-void SourceSyntaxFeatures2::TraversalFeaturesImpl(const SentenceMetadata& smeta,
+void PSourceSyntaxFeatures2::TraversalFeaturesImpl(const SentenceMetadata& smeta,
const Hypergraph::Edge& edge,
const vector<const void*>& ant_contexts,
SparseVector<double>* features,
@@ -161,6 +161,6 @@ void SourceSyntaxFeatures2::TraversalFeaturesImpl(const SentenceMetadata& smeta,
impl->FireFeatures(*edge.rule_, edge.i_, edge.j_, ants, features);
}
-void SourceSyntaxFeatures2::PrepareForInput(const SentenceMetadata& smeta) {
+void PSourceSyntaxFeatures2::PrepareForInput(const SentenceMetadata& smeta) {
impl->InitializeGrids(smeta.GetSGMLValue("src_tree"), smeta.GetSourceLength());
}