summaryrefslogtreecommitdiff
path: root/decoder/ff_charset.h
blob: b1ad537e0a4a9d8c63026708aba218760bb55b55 (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 Hypergraph::Edge& edge,
                                     const std::vector<const void*>& ant_contexts,
                                     FeatureVector* features,
                                     FeatureVector* estimated_features,
                                     void* context) const;
 private:
  mutable std::map<WordID, bool> is_non_latin_;
  const int fid_;
};

#endif