diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-31 01:56:56 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-31 01:56:56 +0000 |
commit | d8fa7f3e9b8127911996c36f477bcae3831f7708 (patch) | |
tree | a217daf9c2f7ad02bdc0b2e17e258754b19eec30 /decoder/apply_fsa_models.cc | |
parent | 2af5a445f3905c69c42be5c758c52a2f21b17446 (diff) |
l2r bugfixes
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@635 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/apply_fsa_models.cc')
-rwxr-xr-x | decoder/apply_fsa_models.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/decoder/apply_fsa_models.cc b/decoder/apply_fsa_models.cc index 4a928206..83083fc5 100755 --- a/decoder/apply_fsa_models.cc +++ b/decoder/apply_fsa_models.cc @@ -495,9 +495,8 @@ typedef Item *ItemP; /* we use a single type of item so it can live in a single best-first queue. we hold them by pointer so they can have mutable state, e.g. priority/location, but also lists of predictions and kbest completions (i.e. completions[L,r] = L -> * (r,s), by 1best for each possible s. we may discover more s later. we could use different subtypes since we hold by pointer, but for now everything will be packed as variants of Item */ struct Item : ItemPrio,ItemKey { - explicit Item(NodeP dot,int next=0) : ItemKey(dot),next(next),from(0) { } - explicit Item(NodeP dot,FFState const& state,int next=0) : ItemKey(dot,state),next(next),from(0) { } - unsigned location; + explicit Item(NodeP dot,int next=0) : ItemKey(dot),next(next),from(0),location(D_ARY_HEAP_NULL_INDEX) { } + explicit Item(NodeP dot,FFState const& state,int next=0) : ItemKey(dot,state),next(next),from(0),location(D_ARY_HEAP_NULL_INDEX) { } typedef std::queue<ItemP> Predicted; Predicted predicted; // this is empty, unless this is a predicted L -> .asdf item, or a to-complete L -> asdf . int next; // index of dot->adj to complete (if dest==0), or predict (if NT), or scan (if word). note: we could store pointer inside adj since it and trie are @ fixed addrs. less pointer arith, more space. @@ -517,6 +516,7 @@ struct Item : ItemPrio,ItemKey { o<< ']'; } PRINT_SELF(Item) + unsigned location; }; struct GetItemKey { @@ -645,6 +645,7 @@ void ApplyFsa<F>::ApplyEarley() Chart<F> chart(cfg,smeta,fsa); // don't need to uniq - option to do that already exists in cfg_options //TODO: + *oh=hgcfg.ih; } |