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 | 5f9c85a6072d64b10879feafc040374e274027eb (patch) | |
| tree | cebeb55f05e770bd8b1983821312c1856caec0a8 /decoder/ff_from_fsa.h | |
| parent | a4187c028432c9f9ec3693747abc1c52ef310deb (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 | 
