diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-28 07:10:09 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-28 07:10:09 +0000 |
commit | 202295eec8656a79115072d113afeb82ed660d78 (patch) | |
tree | fb5da2976ec0c44b54ba7aa1fa1850520cd15bb3 /decoder/ff_lm.cc | |
parent | 6912768e34f12b615355d32b6976a56dca58a398 (diff) |
debugging print - still no idea on .05% difference scoring 3gram using phrases
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@446 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_lm.cc')
-rw-r--r-- | decoder/ff_lm.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/decoder/ff_lm.cc b/decoder/ff_lm.cc index e8d3bbb0..2b97bea8 100644 --- a/decoder/ff_lm.cc +++ b/decoder/ff_lm.cc @@ -1,5 +1,6 @@ #define LM_FSA_SHORTEN_CONTEXT 1 -// seems to work great - just not sure if it actually speeds anything up +// seems to work great - just not sure if it actually speeds anything up. theoretically slightly more compact (more sharing) forest, but unlikely to make a big difference + // virtual LogP contextBOW(const VocabIndex *context, unsigned length); /* backoff weight for truncating context */ // does that need to be used? i think so. @@ -619,11 +620,12 @@ LanguageModelFsa::LanguageModelFsa(string const& param) { void LanguageModelFsa::print_state(ostream &o,void const* st) const { WordID const *wst=(WordID const*)st; o<<'['; - for (int i=ctxlen_;i>0;) { + bool sp=false; + for (int i=ctxlen_;i>0;sp=true) { --i; WordID w=wst[i]; if (w==TD::none) continue; - if (i) o<<' '; + if (sp) o<<' '; o << TD::Convert(w); } o<<']'; |