summaryrefslogtreecommitdiff
path: root/decoder/ff_spans.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-02-17 23:41:29 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-02-17 23:41:29 -0500
commitb6a372a529093975464e23cb01cb2a9ee3e7b0c7 (patch)
tree38f17b74c0afb6b14a4a00d013298e6fe9073b66 /decoder/ff_spans.h
parentb53636855b8370fd3a6f61041d351c3d14f952c6 (diff)
more spans
Diffstat (limited to 'decoder/ff_spans.h')
-rw-r--r--decoder/ff_spans.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/decoder/ff_spans.h b/decoder/ff_spans.h
index 0446d062..5e90b7e0 100644
--- a/decoder/ff_spans.h
+++ b/decoder/ff_spans.h
@@ -2,8 +2,10 @@
#define _FF_SPANS_H_
#include <vector>
+#include <map>
#include "ff.h"
#include "array2d.h"
+#include "wordid.h"
class SpanFeatures : public FeatureFunction {
public:
@@ -17,11 +19,14 @@ class SpanFeatures : public FeatureFunction {
void* context) const;
virtual void PrepareForInput(const SentenceMetadata& smeta);
private:
+ WordID MapIfNecessary(const WordID& w) const;
const int kS;
const int kX;
Array2D<int> span_feats_;
std::vector<int> end_span_ids_;
std::vector<int> beg_span_ids_;
+ std::map<WordID, WordID> word2class_; // optional projection to coarser class
+ WordID oov_;
};
#endif