diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-23 23:10:34 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-23 23:10:34 +0000 |
commit | eac7943a058db20a9e6a50fbbd8ff87b0ce56fc4 (patch) | |
tree | 4c3d2bd45ce252e33d549558a86445cb0c61e417 /decoder/ff_from_fsa.h | |
parent | 2cb75daa1e294bcffa49b9e82359bcae61938ded (diff) |
strip debug param from feature spec; debug info on from_fsa Init
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@393 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_from_fsa.h')
-rwxr-xr-x | decoder/ff_from_fsa.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/decoder/ff_from_fsa.h b/decoder/ff_from_fsa.h index 04a30578..51d89376 100755 --- a/decoder/ff_from_fsa.h +++ b/decoder/ff_from_fsa.h @@ -28,6 +28,7 @@ class FeatureFunctionFromFsa : public FeatureFunction { typedef WordID const* WP; public: FeatureFunctionFromFsa(std::string const& param) : ff(param) { + FSAFFDBG(ff.name()<<" params="<<param<<" calling Init: "); Init(); } @@ -137,6 +138,7 @@ public: return o.str(); } + //FIXME: it's assumed that the final rule is just a unary no-target-terminal rewrite (same as ff_lm) virtual void FinalTraversalFeatures(const SentenceMetadata& smeta, const void* residual_state, FeatureVector* final_features) const @@ -189,12 +191,14 @@ private: M=ff.markov_order(); ssz=ff.state_bytes(); state_offset=sizeof(WordID)*M; - SetStateSize(ff.state_bytes()+state_offset); + SetStateSize(ssz+state_offset); + assert(!ssz == !M); // no fsa state <=> markov order 0 + FSAFFDBG("order="<<M<<" fsa_state_offset="<<state_offset<<" fsa_state_bytes="<<ssz<<" ff_state_bytes="<<StateSize()<<'\n'); } int M; // markov order (ctx len) FeatureFunctionFromFsa(); // not allowed. - int state_offset; // store left-words first, then fsa state + int state_offset; // NOTE: in bytes (add to char* only). store left-words first, then fsa state int ssz; // bytes in fsa state /* state layout: left WordIds, followed by fsa state |