summaryrefslogtreecommitdiff
path: root/decoder/ff_lm_fsa.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-31 05:10:54 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-31 05:10:54 +0000
commit6da285dfa7b0a1929dcec882d7e48a585e878d18 (patch)
tree1063307d28e9d386f0aee99782d495b2c90726bb /decoder/ff_lm_fsa.h
parent78c13aa02075f07f7361bf53eea2a9a247f39575 (diff)
shorten_left comment
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@464 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_lm_fsa.h')
-rwxr-xr-xdecoder/ff_lm_fsa.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/ff_lm_fsa.h b/decoder/ff_lm_fsa.h
index 9ba7b2c5..df11ab18 100755
--- a/decoder/ff_lm_fsa.h
+++ b/decoder/ff_lm_fsa.h
@@ -44,7 +44,9 @@ struct LanguageModelFsa : public FsaFeatureFunctionBase<LanguageModelFsa> {
template <class Accum>
void ScanAccum(SentenceMetadata const& /* smeta */,Hypergraph::Edge const& edge,WordID w,void const* old_st,void *new_st,Accum *a) const {
+#if USE_INFO_EDGE
Hypergraph::Edge &de=(Hypergraph::Edge &)edge;
+#endif
if (!ctxlen_) {
Add(floored(pimpl_->WordProb(w,&empty_context)),a);
return;
@@ -72,7 +74,9 @@ struct LanguageModelFsa : public FsaFeatureFunctionBase<LanguageModelFsa> {
//FIXME: there is a bug in here somewhere, or else the 3gram LM we use gives different scores for phrases (impossible? BOW nonzero when shortening context past what LM has?)
template <class Accum>
void ScanPhraseAccum(SentenceMetadata const& /* smeta */,const Hypergraph::Edge&edge,WordID const* begin,WordID const* end,void const* old_st,void *new_st,Accum *a) const {
+# if USE_INFO_EDGE
Hypergraph::Edge &de=(Hypergraph::Edge &)edge;
+# endif
if (begin==end) return; // otherwise w/ shortening it's possible to end up with no words at all.
/* // this is forcing unigram prob always. we will instead build the phrase
if (!ctxlen_) {