From 4f9933d668d247ea5831c3f2af0b996a94da28f7 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 10 Mar 2011 01:58:30 -0500 Subject: remove dependency on SRILM --- decoder/ff_from_fsa.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'decoder/ff_from_fsa.h') diff --git a/decoder/ff_from_fsa.h b/decoder/ff_from_fsa.h index 26aca048..f2db8a4b 100755 --- a/decoder/ff_from_fsa.h +++ b/decoder/ff_from_fsa.h @@ -3,6 +3,11 @@ #include "ff_fsa.h" +#ifndef TD__none +// replacing dependency on SRILM +#define TD__none -1 +#endif + #ifndef FSA_FF_DEBUG # define FSA_FF_DEBUG 0 #endif @@ -94,7 +99,7 @@ public: return; } - // bear with me, because this is hard to understand. reminder: ant_contexts and out_state are left-words first (up to M, TD::none padded). if all M words are present, then FSA state follows. otherwise 0 bytes to keep memcmp/hash happy. + // bear with me, because this is hard to understand. reminder: ant_contexts and out_state are left-words first (up to M, TD__none padded). if all M words are present, then FSA state follows. otherwise 0 bytes to keep memcmp/hash happy. //why do we compute heuristic in so many places? well, because that's how we know what state we should score words in once we're full on our left context (because of markov order bound, we know the score will be the same no matter what came before that left context) // these left_* refer to our output (out_state): @@ -163,7 +168,7 @@ public: if (left_outleft;--e) - if (e[-1]!=TD::none) break; + if (e[-1]!=TD__none) break; //post: [left,e] are the seen left words return e; } -- cgit v1.2.3