diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2011-11-21 15:14:05 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2011-11-21 15:14:05 +0400 |
commit | 5baa595a91ff41e26c61f83ffafa77046e432843 (patch) | |
tree | b97518cf913be1276c9de54cfccd41387836337f | |
parent | 3dc30fd51a77a7f4df1a213e182f7e69fd3b076a (diff) |
Further direction removal
-rw-r--r-- | moses-chart-cmd/src/Main.cpp | 4 | ||||
-rw-r--r-- | moses-cmd/src/IOWrapper.cpp | 2 | ||||
-rw-r--r-- | moses-cmd/src/LatticeMBRGrid.cpp | 2 | ||||
-rw-r--r-- | moses-cmd/src/Main.cpp | 2 | ||||
-rw-r--r-- | moses/src/Sentence.cpp | 3 | ||||
-rw-r--r-- | moses/src/Sentence.h | 2 | ||||
-rw-r--r-- | moses/src/TreeInput.h | 3 |
7 files changed, 8 insertions, 10 deletions
diff --git a/moses-chart-cmd/src/Main.cpp b/moses-chart-cmd/src/Main.cpp index 03c8105ee..50f2eaddb 100644 --- a/moses-chart-cmd/src/Main.cpp +++ b/moses-chart-cmd/src/Main.cpp @@ -147,7 +147,7 @@ bool ReadInput(IOWrapper &ioWrapper, InputTypeEnum inputType, InputType*& source delete source; switch(inputType) { case SentenceInput: - source = ioWrapper.GetInput(new Sentence(Input)); + source = ioWrapper.GetInput(new Sentence); break; case ConfusionNetworkInput: source = ioWrapper.GetInput(new ConfusionNet); @@ -156,7 +156,7 @@ bool ReadInput(IOWrapper &ioWrapper, InputTypeEnum inputType, InputType*& source source = ioWrapper.GetInput(new WordLattice); break; case TreeInputType: - source = ioWrapper.GetInput(new TreeInput(Input)); + source = ioWrapper.GetInput(new TreeInput); break; default: TRACE_ERR("Unknown input type: " << inputType << "\n"); diff --git a/moses-cmd/src/IOWrapper.cpp b/moses-cmd/src/IOWrapper.cpp index 318f44403..5fcdbab3a 100644 --- a/moses-cmd/src/IOWrapper.cpp +++ b/moses-cmd/src/IOWrapper.cpp @@ -530,7 +530,7 @@ bool ReadInput(IOWrapper &ioWrapper, InputTypeEnum inputType, InputType*& source delete source; switch(inputType) { case SentenceInput: - source = ioWrapper.GetInput(new Sentence(Input)); + source = ioWrapper.GetInput(new Sentence); break; case ConfusionNetworkInput: source = ioWrapper.GetInput(new ConfusionNet); diff --git a/moses-cmd/src/LatticeMBRGrid.cpp b/moses-cmd/src/LatticeMBRGrid.cpp index 8d6095dde..8bd52b7d7 100644 --- a/moses-cmd/src/LatticeMBRGrid.cpp +++ b/moses-cmd/src/LatticeMBRGrid.cpp @@ -172,7 +172,7 @@ int main(int argc, char* argv[]) while(ReadInput(*ioWrapper,staticData.GetInputType(),source)) { ++lineCount; - Sentence sentence(Input); + Sentence sentence; const TranslationSystem& system = staticData.GetTranslationSystem(TranslationSystem::DEFAULT); Manager manager(*source,staticData.GetSearchAlgorithm(), &system); manager.ProcessSentence(); diff --git a/moses-cmd/src/Main.cpp b/moses-cmd/src/Main.cpp index 76bbbee20..b4f1fb08d 100644 --- a/moses-cmd/src/Main.cpp +++ b/moses-cmd/src/Main.cpp @@ -95,7 +95,7 @@ public: // shorthand for "global data" const StaticData &staticData = StaticData::Instance(); // input sentence - Sentence sentence(Input); + Sentence sentence(); // set translation system const TranslationSystem& system = staticData.GetTranslationSystem(TranslationSystem::DEFAULT); diff --git a/moses/src/Sentence.cpp b/moses/src/Sentence.cpp index 08a4f2b4c..87ede7c7a 100644 --- a/moses/src/Sentence.cpp +++ b/moses/src/Sentence.cpp @@ -33,11 +33,10 @@ using namespace std; namespace Moses { -Sentence::Sentence(FactorDirection direction) +Sentence::Sentence() : Phrase(0) , InputType() { - CHECK(direction == Input); const StaticData& staticData = StaticData::Instance(); if (staticData.GetSearchAlgorithm() == ChartDecoding) { m_defaultLabelSet.insert(StaticData::Instance().GetInputDefaultNonTerminal()); diff --git a/moses/src/Sentence.h b/moses/src/Sentence.h index 20b34c4c7..b1c25f9dd 100644 --- a/moses/src/Sentence.h +++ b/moses/src/Sentence.h @@ -60,7 +60,7 @@ private: public: - Sentence(FactorDirection direction); + Sentence(); InputTypeEnum GetType() const { return SentenceInput; diff --git a/moses/src/TreeInput.h b/moses/src/TreeInput.h index f621ef0bd..a6242d97e 100644 --- a/moses/src/TreeInput.h +++ b/moses/src/TreeInput.h @@ -37,8 +37,7 @@ protected: bool ProcessAndStripXMLTags(std::string &line, std::vector<XMLParseOutput> &sourceLabels); public: - TreeInput(FactorDirection direction) - : Sentence(direction) + TreeInput() {} InputTypeEnum GetType() const { |