summaryrefslogtreecommitdiff
path: root/decoder/ff_sample_fsa.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/ff_sample_fsa.h')
-rwxr-xr-xdecoder/ff_sample_fsa.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/decoder/ff_sample_fsa.h b/decoder/ff_sample_fsa.h
index fb44dade..a129806d 100755
--- a/decoder/ff_sample_fsa.h
+++ b/decoder/ff_sample_fsa.h
@@ -132,10 +132,9 @@ struct ShorterThanPrev : FsaTypedBase<int,ShorterThanPrev> {
*/
// evil anti-google int & len out-param:
- void ScanT(SentenceMetadata const& /* smeta */,const Hypergraph::Edge& /* edge */,WordID w,int prevlen,int &len,FeatureVector *features) const {
+ Featval ScanT1(SentenceMetadata const& /* smeta */,const Hypergraph::Edge& /* edge */,WordID w,int prevlen,int &len) const {
len=wordlen(w);
- if (len<prevlen)
- features->add_value(fid_,1);
+ return (len<prevlen) ? 1 : 0;
}
};