From ae5e39fa86ddadd988ad3f2f0a0bcd7998264433 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Mon, 7 Nov 2011 20:45:05 +0700 Subject: delete premature lattice for scfg --- moses/moses.xcodeproj/project.pbxproj | 16 ---------- moses/src/Makefile.am | 4 --- moses/src/PCNTools.cpp | 5 --- moses/src/PCNTools.h | 2 -- moses/src/WeightedDirectedGraph.cpp | 9 ------ moses/src/WeightedDirectedGraph.h | 27 ---------------- moses/src/WordLattice2.cpp | 60 ----------------------------------- moses/src/WordLattice2.h | 48 ---------------------------- 8 files changed, 171 deletions(-) delete mode 100644 moses/src/WeightedDirectedGraph.cpp delete mode 100644 moses/src/WeightedDirectedGraph.h delete mode 100644 moses/src/WordLattice2.cpp delete mode 100644 moses/src/WordLattice2.h (limited to 'moses') diff --git a/moses/moses.xcodeproj/project.pbxproj b/moses/moses.xcodeproj/project.pbxproj index 2010b6611..cc98e44d4 100644 --- a/moses/moses.xcodeproj/project.pbxproj +++ b/moses/moses.xcodeproj/project.pbxproj @@ -66,10 +66,6 @@ 1E2E163D132A892800ED4085 /* RuleCubeQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1636132A892800ED4085 /* RuleCubeQueue.h */; }; 1E2E163E132A892800ED4085 /* ThreadPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1637132A892800ED4085 /* ThreadPool.cpp */; }; 1E2E163F132A892800ED4085 /* ThreadPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1638132A892800ED4085 /* ThreadPool.h */; }; - 1E3CBD3A145D755D00AF72FC /* WordLattice2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3CBD38145D755D00AF72FC /* WordLattice2.cpp */; }; - 1E3CBD3B145D755D00AF72FC /* WordLattice2.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3CBD39145D755D00AF72FC /* WordLattice2.h */; }; - 1E3CBD3F145D75F300AF72FC /* WeightedDirectedGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3CBD3D145D75F300AF72FC /* WeightedDirectedGraph.cpp */; }; - 1E3CBD40145D75F300AF72FC /* WeightedDirectedGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3CBD3E145D75F300AF72FC /* WeightedDirectedGraph.h */; }; 1E46B5A613BA5C7F0084F898 /* RuleCubeItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E46B5A413BA5C7F0084F898 /* RuleCubeItem.cpp */; }; 1E46B5A713BA5C7F0084F898 /* RuleCubeItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E46B5A513BA5C7F0084F898 /* RuleCubeItem.h */; }; 1E474E12145575CA00178AD5 /* RuleTableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E474E11145575CA00178AD5 /* RuleTableLoader.h */; }; @@ -338,10 +334,6 @@ 1E2E1636132A892800ED4085 /* RuleCubeQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCubeQueue.h; path = src/RuleCubeQueue.h; sourceTree = ""; }; 1E2E1637132A892800ED4085 /* ThreadPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPool.cpp; path = src/ThreadPool.cpp; sourceTree = ""; }; 1E2E1638132A892800ED4085 /* ThreadPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPool.h; path = src/ThreadPool.h; sourceTree = ""; }; - 1E3CBD38145D755D00AF72FC /* WordLattice2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordLattice2.cpp; path = src/WordLattice2.cpp; sourceTree = ""; }; - 1E3CBD39145D755D00AF72FC /* WordLattice2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordLattice2.h; path = src/WordLattice2.h; sourceTree = ""; }; - 1E3CBD3D145D75F300AF72FC /* WeightedDirectedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WeightedDirectedGraph.cpp; path = src/WeightedDirectedGraph.cpp; sourceTree = ""; }; - 1E3CBD3E145D75F300AF72FC /* WeightedDirectedGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WeightedDirectedGraph.h; path = src/WeightedDirectedGraph.h; sourceTree = ""; }; 1E46B5A413BA5C7F0084F898 /* RuleCubeItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleCubeItem.cpp; path = src/RuleCubeItem.cpp; sourceTree = ""; }; 1E46B5A513BA5C7F0084F898 /* RuleCubeItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCubeItem.h; path = src/RuleCubeItem.h; sourceTree = ""; }; 1E474E11145575CA00178AD5 /* RuleTableLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleTableLoader.h; path = src/RuleTableLoader.h; sourceTree = ""; }; @@ -806,10 +798,6 @@ 1ED0FE25124BB9380029177F /* WordsBitmap.h */, 1ED0FE26124BB9380029177F /* WordsRange.cpp */, 1ED0FE27124BB9380029177F /* WordsRange.h */, - 1E3CBD3D145D75F300AF72FC /* WeightedDirectedGraph.cpp */, - 1E3CBD3E145D75F300AF72FC /* WeightedDirectedGraph.h */, - 1E3CBD38145D755D00AF72FC /* WordLattice2.cpp */, - 1E3CBD39145D755D00AF72FC /* WordLattice2.h */, 1ED0FE28124BB9380029177F /* XmlOption.cpp */, 1ED0FE29124BB9380029177F /* XmlOption.h */, 1ED0FD88124BB9380029177F /* gzfilebuf.h */, @@ -1030,8 +1018,6 @@ 1E16D0BC144DAA6C00B60B4F /* SingleFactor.h in Headers */, 1E16D0BE144DAA6C00B60B4F /* SRI.h in Headers */, 1E474E12145575CA00178AD5 /* RuleTableLoader.h in Headers */, - 1E3CBD3B145D755D00AF72FC /* WordLattice2.h in Headers */, - 1E3CBD40145D75F300AF72FC /* WeightedDirectedGraph.h in Headers */, 1E078C1C14643AED00A707F4 /* PhraseDictionaryHiero.h in Headers */, 1E078C21146440A900A707F4 /* RuleTableLoaderHiero.h in Headers */, 1E2755B614667CC3009D1DF9 /* PhraseDictionaryALSuffixArray.h in Headers */, @@ -1210,8 +1196,6 @@ 1E16D0B5144DAA6C00B60B4F /* ParallelBackoff.cpp in Sources */, 1E16D0BB144DAA6C00B60B4F /* SingleFactor.cpp in Sources */, 1E16D0BD144DAA6C00B60B4F /* SRI.cpp in Sources */, - 1E3CBD3A145D755D00AF72FC /* WordLattice2.cpp in Sources */, - 1E3CBD3F145D75F300AF72FC /* WeightedDirectedGraph.cpp in Sources */, 1E078C1F14643C2000A707F4 /* PhraseDictionaryHiero.cpp in Sources */, 1E078C23146440F700A707F4 /* RuleTableLoaderHiero.cpp in Sources */, 1E2755B314667CA4009D1DF9 /* PhraseDictionaryALSuffixArray.cpp in Sources */, diff --git a/moses/src/Makefile.am b/moses/src/Makefile.am index 3d4924d6a..32fe1cb4b 100644 --- a/moses/src/Makefile.am +++ b/moses/src/Makefile.am @@ -127,10 +127,8 @@ libmoses_la_HEADERS = \ UniqueObject.h \ UserMessage.h \ Util.h \ - WeightedDirectedGraph.h \ Word.h \ WordLattice.h \ - WordLattice2.h \ WordsBitmap.h \ WordsRange.h \ XmlOption.h @@ -277,10 +275,8 @@ libmoses_la_SOURCES = \ TrellisPathCollection.cpp \ UserMessage.cpp \ Util.cpp \ - WeightedDirectedGraph.cpp \ Word.cpp \ WordLattice.cpp \ - WordLattice2.cpp \ WordsBitmap.cpp \ WordsRange.cpp \ XmlOption.cpp diff --git a/moses/src/PCNTools.cpp b/moses/src/PCNTools.cpp index 356ae094f..fac386444 100644 --- a/moses/src/PCNTools.cpp +++ b/moses/src/PCNTools.cpp @@ -165,11 +165,6 @@ CN parsePCN(const std::string& in) return res; } -Moses::WeightedDirectedGraph parseLattice(const std::string& in) -{ - return Moses::WeightedDirectedGraph(); - -} } diff --git a/moses/src/PCNTools.h b/moses/src/PCNTools.h index 13af2b650..1147b73bb 100644 --- a/moses/src/PCNTools.h +++ b/moses/src/PCNTools.h @@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include -#include "WeightedDirectedGraph.h" /** A couple of utilities to read .pcn files. A python-compatible format * for encoding confusion networks and word lattices. @@ -42,7 +41,6 @@ typedef std::vector CN; * word lattice in PCN format, return a CN object representing the lattice */ CN parsePCN(const std::string& in); -Moses::WeightedDirectedGraph parseLattice(const std::string& in); }; diff --git a/moses/src/WeightedDirectedGraph.cpp b/moses/src/WeightedDirectedGraph.cpp deleted file mode 100644 index b947063d3..000000000 --- a/moses/src/WeightedDirectedGraph.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// -// WeightedDirectedGraph.cpp -// moses -// -// Created by Hieu Hoang on 30/10/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#include diff --git a/moses/src/WeightedDirectedGraph.h b/moses/src/WeightedDirectedGraph.h deleted file mode 100644 index b86683a2f..000000000 --- a/moses/src/WeightedDirectedGraph.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// WeightedDirectedGraph.h -// moses -// -// Created by Hieu Hoang on 30/10/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#ifndef moses_WeightedDirectedGraph_h -#define moses_WeightedDirectedGraph_h - -namespace Moses { - -class WeightedDirectedGraphNode -{ - - -}; - -class WeightedDirectedGraph -{ - - -}; - -} -#endif diff --git a/moses/src/WordLattice2.cpp b/moses/src/WordLattice2.cpp deleted file mode 100644 index cbbfe5a9e..000000000 --- a/moses/src/WordLattice2.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// -// WordLattice2.cpp -// moses -// -// Created by Hieu Hoang on 30/10/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#include -#include "WordLattice2.h" -#include "PCNTools.h" - -using namespace std; - -namespace Moses -{ -size_t WordLattice2::GetSize() const -{ - -} - -int WordLattice2::Read(std::istream& in,const std::vector& factorOrder) -{ - std::string line; - if(!getline(in,line)) return 0; - - PCN::parseLattice(line); - -} - -void WordLattice2::Print(std::ostream&) const -{ - -} - -//! create trans options specific to this InputType -TranslationOptionCollection* WordLattice2::CreateTranslationOptionCollection(const TranslationSystem* system) const -{ - -} - -//! return substring. Only valid for Sentence class. TODO - get rid of this fn -Phrase WordLattice2::GetSubString(const WordsRange&) const -{ - -} - -//! return substring at a particular position. Only valid for Sentence class. TODO - get rid of this fn -const Word& WordLattice2::GetWord(size_t pos) const -{ - -} - -const NonTerminalSet &WordLattice2::GetLabelSet(size_t startPos, size_t endPos) const -{ - -} - -} - diff --git a/moses/src/WordLattice2.h b/moses/src/WordLattice2.h deleted file mode 100644 index 79244585f..000000000 --- a/moses/src/WordLattice2.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// WordLattice2.h -// moses -// -// Created by Hieu Hoang on 30/10/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#ifndef moses_WordLattice2_h -#define moses_WordLattice2_h - -#include "InputType.h" - -namespace Moses -{ - -class WordLattice2 : public InputType -{ - -public: - InputTypeEnum GetType() const - { return WordLatticeInput2; } - - virtual size_t GetSize() const; - - //! populate this InputType with data from in stream - virtual int Read(std::istream& in,const std::vector& factorOrder); - - //! Output debugging info to stream out - virtual void Print(std::ostream&) const; - - //! create trans options specific to this InputType - virtual TranslationOptionCollection* CreateTranslationOptionCollection(const TranslationSystem* system) const; - - //! return substring. Only valid for Sentence class. TODO - get rid of this fn - virtual Phrase GetSubString(const WordsRange&) const; - - //! return substring at a particular position. Only valid for Sentence class. TODO - get rid of this fn - virtual const Word& GetWord(size_t pos) const; - - virtual const NonTerminalSet &GetLabelSet(size_t startPos, size_t endPos) const; - - -}; - -} - -#endif -- cgit v1.2.3