summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-23 21:31:30 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-23 21:31:30 +0000
commit7d29a7baf144090f61c8f0b9665bab7eb271f3a2 (patch)
treeccb7d9836ee1e3a1cda1fe4de8a15c26a52f148b /decoder
parent353ff197b082b71c623c7851e0df0ac60d770533 (diff)
more FF_FSA_DEBUG logs
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@388 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder')
-rwxr-xr-xdecoder/ff_from_fsa.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/decoder/ff_from_fsa.h b/decoder/ff_from_fsa.h
index 42fa1e80..820f2433 100755
--- a/decoder/ff_from_fsa.h
+++ b/decoder/ff_from_fsa.h
@@ -141,7 +141,7 @@ public:
const void* residual_state,
FeatureVector* final_features) const
{
- ff.init_features(final_features); // estimated_features is fresh
+ ff.init_features(final_features);
Sentence const& ends=ff.end_phrase();
if (!ssz) {
AccumFeatures(ff,smeta,begin(ends),end(ends),final_features,0);
@@ -150,19 +150,23 @@ public:
SP ss=ff.start_state();
WP l=(WP)residual_state,lend=left_end(residual_state);
SP rst=fsa_state(residual_state);
+ FSAFFDBG("(FromFsa) Final "<<name);
if (lend==rst) { // implying we have an fsa state
AccumFeatures(ff,smeta,l,lend,final_features,ss); // e.g. <s> score(full left unscored phrase)
+ FSAFFDBG(" left: "<<Sentence(l,lend));
AccumFeatures(ff,smeta,begin(ends),end(ends),final_features,rst); // e.g. [ctx for last M words] score("</s>")
+ FSAFFDBG(" right: "<<ff.describe_state(rst)<<" -> "<<ends);
} else { // all we have is a single short phrase < M words before adding ends
int nl=lend-l;
Sentence whole(ends.size()+nl);
WordID *w=begin(whole);
wordcpy(w,l,nl);
wordcpy(w+nl,begin(ends),ends.size());
+ FSAFFDBG(" score whole sentence: "<<whole);
// whole = left-words + end-phrase
AccumFeatures(ff,smeta,w,end(whole),final_features,ss);
}
- FSAFFDBG("Final "<<name<<" = "<<*final_features<<'\n');
+ FSAFFDBG(" = "<<*final_features<<'\n');
}
bool rule_feature() const {