From c14605cf041a3c5887c74e9c1e7815b053e4b82a Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 3 Mar 2011 22:44:42 -0500 Subject: new span features --- decoder/ff_spans.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'decoder/ff_spans.h') 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 > span_feats_; // first for X, second for S + Array2D > len_span_feats_; // first for X, second for S, including length std::vector end_span_ids_; + std::vector end_bigram_ids_; std::vector beg_span_ids_; + std::vector beg_bigram_ids_; std::map word2class_; // optional projection to coarser class // collapsed feature values @@ -35,7 +38,9 @@ class SpanFeatures : public FeatureFunction { int fid_span_; std::map feat2val_; std::vector end_span_vals_; + std::vector end_bigram_vals_; std::vector beg_span_vals_; + std::vector beg_bigram_vals_; Array2D > span_vals_; WordID oov_; @@ -52,8 +57,6 @@ class CMR2008ReorderingFeatures : public FeatureFunction { SparseVector* estimated_features, void* context) const; private: - static int SpanSizeTransform(unsigned span_size); - const int kS; std::pair unconditioned_fids_; // first = monotone // second = inverse -- cgit v1.2.3