summaryrefslogtreecommitdiff
path: root/decoder/ff_charset.h
blob: 267ef65d0be1409e3bfb162272103910bbb0755b (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
#ifndef _FFCHARSET_H_
#define _FFCHARSET_H_

#include <string>
#include <map>
#include "ff.h"
#include "hg.h"

class SentenceMetadata;

class NonLatinCount : public FeatureFunction {
 public:
  NonLatinCount(const std::string& param);
 protected:
  virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta,
                                     const HG::Edge& edge,
                                     const std::vector<const void*>& ant_contexts,
                                     SparseVector<double>* features,
                                     SparseVector<double>* estimated_features,
                                     void* context) const;
 private:
  mutable std::map<WordID, bool> is_non_latin_;
  const int fid_;
};

#endif