summaryrefslogtreecommitdiff
path: root/decoder/ff_fsa.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-21 20:52:35 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-21 20:52:35 +0000
commitc946ad175601eda5a8cb3e6cd0e7c973d3656012 (patch)
tree2766abaeb876e0cb6a9bad4308a11349a072c084 /decoder/ff_fsa.h
parentcb094b00983dabc0393d1fab40b3450266c7c8a9 (diff)
tdict TD:: ss se unk and reserved(i)
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@362 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_fsa.h')
-rwxr-xr-xdecoder/ff_fsa.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/decoder/ff_fsa.h b/decoder/ff_fsa.h
index 0b60ff81..ed159853 100755
--- a/decoder/ff_fsa.h
+++ b/decoder/ff_fsa.h
@@ -6,6 +6,7 @@
#include "ff.h"
#include "sparse_vector.h"
#include "value_array.h"
+#include "tdict.h"
typedef ValueArray<uint8_t> Bytes;
@@ -32,8 +33,18 @@ struct FsaFeatureFunction {
// regular bottom up scorer from Fsa feature
template <class Impl>
-struct FeatureFunctionFromFsa : public FeatureFunction,Impl {
- FeatureFunctionFromFsa(
+struct FeatureFunctionFromFsa : public FeatureFunction {
+ Impl& d() { return static_cast<Impl&>(*this); }
+ Impl const& d() { return static_cast<Impl const&>(*this); }
+
+ FeatureFunctionFromFsa() { }
+ Init() {
+ name=d().name;
+ SetStateSize(sizeof(WordID)*2*MarkovOrder
+ } // can't do this in constructor because we come before d() in order
+
+ virtual Features Features() const { return d().Features(); }
+
};