From a27e2c529ddb7dc1be0c6bcc44e3ab558126d15d Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 24 Jul 2014 10:06:27 +0200 Subject: arg --- fast/hypergraph.hh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'fast/hypergraph.hh') diff --git a/fast/hypergraph.hh b/fast/hypergraph.hh index 86b9069..79ee97b 100644 --- a/fast/hypergraph.hh +++ b/fast/hypergraph.hh @@ -16,6 +16,7 @@ #include "grammar.hh" #include "semiring.hh" #include "dummyvector.h" +#include "sparse_vector.hh" using namespace std; @@ -31,7 +32,7 @@ struct Edge { Node* head; vector tails; score_t score; - string rule; // FIXME + G::Rule* rule; unsigned int arity = 0; unsigned int mark = 0; @@ -40,8 +41,9 @@ struct Edge { size_t head_id_; vector tails_ids_; // node ids + size_t rule_id_; - MSGPACK_DEFINE(head_id_, tails_ids_, rule, score, arity); + MSGPACK_DEFINE(head_id_, tails_ids_, rule_id_, score, arity); }; struct Node { @@ -82,10 +84,10 @@ viterbi(Hypergraph& hg); namespace io { void -read(Hypergraph& hg, string fn); +read(Hypergraph& hg, vector rules, string fn); void -write(Hypergraph& hg, string fn); +write(Hypergraph& hg, vector rules, string fn); void manual(Hypergraph& hg); -- cgit v1.2.3