diff options
Diffstat (limited to 'decoder/kbest.h')
-rw-r--r-- | decoder/kbest.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/decoder/kbest.h b/decoder/kbest.h index b6f55502..4dcd1362 100644 --- a/decoder/kbest.h +++ b/decoder/kbest.h @@ -83,16 +83,16 @@ namespace KBest { explicit EdgeHandle(Derivation const* d) : d(d) { } // operator bool() const { return d->edge; } operator Hypergraph::Edge const* () const { return d->edge; } -// const Hypergraph::Edge* operator ->() const { return d->edge; } +// Hypergraph::Edge const * operator ->() const { return d->edge; } }; -// typedef Derivation EdgeHandle; // will cause copying, below but not performance critical; change to actual handle if you want EdgeHandle operator()(int t,int taili,EdgeHandle const& parent) const { return EdgeHandle(nds[t].D[parent.d->j[taili]]); } std::string derivation_tree(Derivation const& d,bool indent=true,int show_mask=Hypergraph::SPAN|Hypergraph::RULE,int maxdepth=0x7FFFFFFF,int depth=0) const { - return d.edge->derivation_tree(*this,EdgeHandle(&d),indent,show_mask,maxdepth,depth); + EdgeHandle eh(d); + return d.edge->derivation_tree(*this,eh,indent,show_mask,maxdepth,depth); } struct DerivationUniquenessHash { |