summaryrefslogtreecommitdiff
path: root/decoder/ff_spans.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-03-03 22:44:42 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-03-03 22:44:42 -0500
commitc14605cf041a3c5887c74e9c1e7815b053e4b82a (patch)
treef0856095ad81c8fe14c26065dad62ba5a56245fb /decoder/ff_spans.h
parentab307856cf1fe713f236e122231771b4b79a8657 (diff)
new span features
Diffstat (limited to 'decoder/ff_spans.h')
-rw-r--r--decoder/ff_spans.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/decoder/ff_spans.h b/decoder/ff_spans.h
index 9928d70f..67269d26 100644
--- a/decoder/ff_spans.h
+++ b/decoder/ff_spans.h
@@ -23,8 +23,11 @@ class SpanFeatures : public FeatureFunction {
const int kS;
const int kX;
Array2D<std::pair<int,int> > span_feats_; // first for X, second for S
+ Array2D<std::pair<int,int> > len_span_feats_; // first for X, second for S, including length
std::vector<int> end_span_ids_;
+ std::vector<int> end_bigram_ids_;
std::vector<int> beg_span_ids_;
+ std::vector<int> beg_bigram_ids_;
std::map<WordID, WordID> word2class_; // optional projection to coarser class
// collapsed feature values
@@ -35,7 +38,9 @@ class SpanFeatures : public FeatureFunction {
int fid_span_;
std::map<std::string, double> feat2val_;
std::vector<double> end_span_vals_;
+ std::vector<double> end_bigram_vals_;
std::vector<double> beg_span_vals_;
+ std::vector<double> beg_bigram_vals_;
Array2D<std::pair<double,double> > span_vals_;
WordID oov_;
@@ -52,8 +57,6 @@ class CMR2008ReorderingFeatures : public FeatureFunction {
SparseVector<double>* estimated_features,
void* context) const;
private:
- static int SpanSizeTransform(unsigned span_size);
-
const int kS;
std::pair<int, int> unconditioned_fids_; // first = monotone
// second = inverse