From c946ad175601eda5a8cb3e6cd0e7c973d3656012 Mon Sep 17 00:00:00 2001 From: graehl Date: Wed, 21 Jul 2010 20:52:35 +0000 Subject: tdict TD:: ss se unk and reserved(i) git-svn-id: https://ws10smt.googlecode.com/svn/trunk@362 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/ff_fsa.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'decoder/ff_fsa.h') 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 Bytes; @@ -32,8 +33,18 @@ struct FsaFeatureFunction { // regular bottom up scorer from Fsa feature template -struct FeatureFunctionFromFsa : public FeatureFunction,Impl { - FeatureFunctionFromFsa( +struct FeatureFunctionFromFsa : public FeatureFunction { + Impl& d() { return static_cast(*this); } + Impl const& d() { return static_cast(*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(); } + }; -- cgit v1.2.3