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/lattice.h | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/lattice.h (limited to 'src/lattice.h') diff --git a/src/lattice.h b/src/lattice.h deleted file mode 100644 index 71589b92..00000000 --- a/src/lattice.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef __LATTICE_H_ -#define __LATTICE_H_ - -#include -#include -#include "wordid.h" -#include "array2d.h" - -class Lattice; -struct LatticeTools { - static bool LooksLikePLF(const std::string &line); - static void ConvertTextToLattice(const std::string& text, Lattice* pl); - static void ConvertTextOrPLF(const std::string& text_or_plf, Lattice* pl); -}; - -struct LatticeArc { - WordID label; - double cost; - int dist2next; - LatticeArc() : label(), cost(), dist2next() {} - LatticeArc(WordID w, double c, int i) : label(w), cost(c), dist2next(i) {} -}; - -class Lattice : public std::vector > { - friend void LatticeTools::ConvertTextOrPLF(const std::string& text_or_plf, Lattice* pl); - public: - Lattice() {} - explicit Lattice(size_t t, const std::vector& v = std::vector()) : - std::vector >(t, v) {} - int Distance(int from, int to) const { - if (dist_.empty()) - return (to - from); - return dist_(from, to); - } - - private: - void ComputeDistances(); - Array2D dist_; -}; - -#endif -- cgit v1.2.3