diff options
author | Patrick Simianer <p@simianer.de> | 2014-07-24 10:06:27 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-07-24 10:06:27 +0200 |
commit | a27e2c529ddb7dc1be0c6bcc44e3ab558126d15d (patch) | |
tree | 5132a8149d115857b27a17fb40f359f50b325a89 /fast/hypergraph.hh | |
parent | 931401b65f5a06bdb1569c33044679694d35fe41 (diff) |
arg
Diffstat (limited to 'fast/hypergraph.hh')
-rw-r--r-- | fast/hypergraph.hh | 10 |
1 files changed, 6 insertions, 4 deletions
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<Node*> 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<size_t> 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<G::Rule*> rules, string fn); void -write(Hypergraph& hg, string fn); +write(Hypergraph& hg, vector<G::Rule*> rules, string fn); void manual(Hypergraph& hg); |