diff options
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/LatticeMBRGrid.cpp | 7 | ||||
-rw-r--r-- | moses-cmd/Main.cpp | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/moses-cmd/LatticeMBRGrid.cpp b/moses-cmd/LatticeMBRGrid.cpp index 3573d0697..677adb791 100644 --- a/moses-cmd/LatticeMBRGrid.cpp +++ b/moses-cmd/LatticeMBRGrid.cpp @@ -159,7 +159,7 @@ int main(int argc, char* argv[]) StaticData& staticData = const_cast<StaticData&>(StaticData::Instance()); staticData.SetUseLatticeMBR(true); - IOWrapper* ioWrapper = GetIOWrapper(staticData); + IOWrapper* ioWrapper = IOWrapper::GetIOWrapper(staticData); if (!ioWrapper) { throw runtime_error("Failed to initialise IOWrapper"); @@ -180,8 +180,9 @@ int main(int argc, char* argv[]) while(ReadInput(*ioWrapper,staticData.GetInputType(),source)) { ++lineCount; - Sentence sentence; - Manager manager(lineCount, *source, staticData.GetSearchAlgorithm()); + source->SetTranslationId(lineCount); + + Manager manager(*source, staticData.GetSearchAlgorithm()); manager.ProcessSentence(); TrellisPathList nBestList; manager.CalcNBest(nBestSize, nBestList,true); diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp index 994837d4a..513c3a187 100644 --- a/moses-cmd/Main.cpp +++ b/moses-cmd/Main.cpp @@ -142,6 +142,7 @@ int main(int argc, char** argv) InputType* source = NULL; size_t lineCount = staticData.GetStartTranslationId(); while(ReadInput(*ioWrapper,staticData.GetInputType(),source)) { + source->SetTranslationId(lineCount); IFVERBOSE(1) { ResetUserTime(); } @@ -150,7 +151,7 @@ int main(int argc, char** argv) // set up task of translating one sentence TranslationTask* task = - new TranslationTask(lineCount,source, *ioWrapper, + new TranslationTask(source, *ioWrapper, staticData.GetOutputSearchGraphSLF(), hypergraphOutput); // execute task |