summaryrefslogtreecommitdiff
path: root/decoder/sentences.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-27 04:59:37 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-27 04:59:37 +0000
commitcc7ee5e3f6ac08750b80e468b77e8ad732e48b77 (patch)
tree2bd8688735602402918b02747ed7557a1aed97d4 /decoder/sentences.h
parentd038d9d39793f140c97bf71163fa0556ad015014 (diff)
fsa feature templated Accum interface, phrase interface allows exceeding markov order e.g. unigram state, 3gram lm. use Accum,set_value rather than clear,add_value. warning: 3gram fsa lm disagrees with bottom-up in 4th decimal place
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@431 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/sentences.h')
-rwxr-xr-xdecoder/sentences.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/sentences.h b/decoder/sentences.h
index 452fb21e..4c71f8f1 100755
--- a/decoder/sentences.h
+++ b/decoder/sentences.h
@@ -29,7 +29,10 @@ inline void wordcpy(WordID *dest,WordID const* src,int n) {
inline void wordcpy(WordID *dest,WordID const* src,WordID const* src_end) {
wordcpy(dest,src,src_end-src);
}
-
+inline void wordcpy_reverse(WordID *dest,WordID const* src,WordID const* src_end) {
+ for(WordID const* i=src_end;i>src;)
+ *dest++=*--i;
+}
inline Sentence singleton_sentence(WordID t) {
return Sentence(1,t);
}