summaryrefslogtreecommitdiff
path: root/python/src/hypergraph.pxd
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-08-14 22:50:37 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-08-14 22:50:37 -0400
commit9c9213239263e8e8de2f154068cc3ad44e0c2100 (patch)
treea9ee2f722e4dc5705ae9f90f6fb3b67a278c5fd9 /python/src/hypergraph.pxd
parent0823824b5fa1504b6b2c48328aa8fc8468017cba (diff)
[cdec.sa] Explicit feature names in grammar extractor output
+ sparse features in extractor + hg.intersect(string) + basestring = str|unicode
Diffstat (limited to 'python/src/hypergraph.pxd')
-rw-r--r--python/src/hypergraph.pxd6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/src/hypergraph.pxd b/python/src/hypergraph.pxd
index 1ddc2e5d..acab7244 100644
--- a/python/src/hypergraph.pxd
+++ b/python/src/hypergraph.pxd
@@ -31,6 +31,7 @@ cdef extern from "decoder/hg.h":
ctypedef HypergraphNode const_HypergraphNode "const Hypergraph::Node"
cdef cppclass Hypergraph:
+ Hypergraph()
Hypergraph(Hypergraph) nogil
vector[HypergraphNode] nodes_
vector[HypergraphEdge] edges_
@@ -57,10 +58,13 @@ cdef extern from "decoder/viterbi.h":
string JoshuaVisualizationString(Hypergraph& hg) nogil
cdef extern from "decoder/hg_io.h" namespace "HypergraphIO":
+ # Hypergraph JSON I/O
bint ReadFromJSON(istream* inp, Hypergraph* out)
bint WriteToJSON(Hypergraph& hg, bint remove_rules, ostream* out)
- void ReadFromPLF(string& inp, Hypergraph* out, int line)
+ # Hypergraph PLF I/O
+ void ReadFromPLF(string& inp, Hypergraph* out)
string AsPLF(Hypergraph& hg, bint include_global_parentheses)
+ # Lattice PLF I/O
void PLFtoLattice(string& plf, Lattice* pl)
string AsPLF(Lattice& lat, bint include_global_parentheses)