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
commit46f2a84ae599fdf53c70519950873df4318a16b1 (patch)
tree6659981a4ecb3fc756d617af968324de6f1afab0 /decoder/ff_source_syntax2_p.cc
parent6c0e5139068b8e92a10445b7e19f4878443ade03 (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());
}