summaryrefslogtreecommitdiff
path: root/decoder/ff_charset.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/ff_charset.h')
-rw-r--r--decoder/ff_charset.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/decoder/ff_charset.h b/decoder/ff_charset.h
new file mode 100644
index 00000000..b1ad537e
--- /dev/null
+++ b/decoder/ff_charset.h
@@ -0,0 +1,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