From 851e389dffdd6996ea32d70defb8906de80b9edc Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 14 Dec 2009 20:35:11 -0500 Subject: few small fixes of alignment tools, add new orthographic similarity feature for word aligner, final naming of directories, libraries in cdec --- src/hg_io.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/hg_io.h (limited to 'src/hg_io.h') diff --git a/src/hg_io.h b/src/hg_io.h deleted file mode 100644 index 69a516c1..00000000 --- a/src/hg_io.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _HG_IO_H_ -#define _HG_IO_H_ - -#include - -#include "lattice.h" -class Hypergraph; - -struct HypergraphIO { - - // the format is basically a list of nodes and edges in topological order - // any edge you read, you must have already read its tail nodes - // any node you read, you must have already read its incoming edges - // this may make writing a bit more challenging if your forest is not - // topologically sorted (but that probably doesn't happen very often), - // but it makes reading much more memory efficient. - // see test_data/small.json.gz for an email encoding - static bool ReadFromJSON(std::istream* in, Hypergraph* out); - - // if remove_rules is used, the hypergraph is serialized without rule information - // (so it only contains structure and feature information) - static bool WriteToJSON(const Hypergraph& hg, bool remove_rules, std::ostream* out); - - // serialization utils - static void ReadFromPLF(const std::string& in, Hypergraph* out, int line = 0); - // return PLF string representation (undefined behavior on non-lattices) - static std::string AsPLF(const Hypergraph& hg, bool include_global_parentheses = true); - static void PLFtoLattice(const std::string& plf, Lattice* pl); - static std::string Escape(const std::string& s); // PLF helper -}; - -namespace B64 { - bool b64decode(const unsigned char* data, const size_t insize, char* out, const size_t outsize); - void b64encode(const char* data, const size_t size, std::ostream* out); -} - -#endif -- cgit v1.2.3