summaryrefslogtreecommitdiff
path: root/rst_parser/arc_ff.h
blob: 52f311d2474f880e413085edb56710cbd9b5f4da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _ARC_FF_H_
#define _ARC_FF_H_

#include <string>
#include "sparse_vector.h"
#include "weights.h"
#include "arc_factored.h"

struct TaggedSentence;
struct ArcFFImpl;
class ArcFeatureFunctions {
 public:
  ArcFeatureFunctions();
  ~ArcFeatureFunctions();

  // called once, per input, before any calls to EdgeFeatures
  // used to initialize sentence-specific data structures
  void PrepareForInput(const TaggedSentence& sentence);

  void EdgeFeatures(const TaggedSentence& sentence,
                    short h,
                    short m,
                    SparseVector<weight_t>* features) const;
 private:
  ArcFFImpl* pimpl;
};

#endif