diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2010-12-23 20:22:45 -0600 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2010-12-23 20:22:45 -0600 |
commit | 6b4b4f19f44e051e5f62bcb1243c3d199d537cc6 (patch) | |
tree | c3dcea05a77c84424a804b12291f8b89a591a603 /decoder/ff_charset.h | |
parent | 1ffcac39647bdc13e6f6ef73ade6b88d59a08101 (diff) |
non-latin character detector
Diffstat (limited to 'decoder/ff_charset.h')
-rw-r--r-- | decoder/ff_charset.h | 26 |
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 |