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 --- decoder/aligner.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 decoder/aligner.h (limited to 'decoder/aligner.h') diff --git a/decoder/aligner.h b/decoder/aligner.h new file mode 100644 index 00000000..970c72f2 --- /dev/null +++ b/decoder/aligner.h @@ -0,0 +1,23 @@ +#ifndef _ALIGNER_H_ + +#include +#include +#include +#include "array2d.h" +#include "lattice.h" + +class Hypergraph; + +struct AlignerTools { + static boost::shared_ptr > ReadPharaohAlignmentGrid(const std::string& al); + static void SerializePharaohFormat(const Array2D& alignment, std::ostream* out); + + // assumption: g contains derivations of input/ref and + // ONLY input/ref. + static void WriteAlignment(const std::string& input, + const Lattice& ref, + const Hypergraph& g, + bool map_instead_of_viterbi = true); +}; + +#endif -- cgit v1.2.3