print input line number in logs

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@663 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
redpony 2006-08-11 20:16:27 +00:00
parent 34c4312b6a
commit 8e986774e1

View File

@ -109,11 +109,12 @@ int main(int argc, char* argv[])
// read each sentence & decode
InputType *source=0;
size_t lineCount = 0;
while(readInput(inputOutput,staticData.GetInputType(),source))
{
// note: source is only valid within this while loop!
TRACE_ERR("\nTRANSLATING: " << *source <<endl);
TRACE_ERR("\nTRANSLATING(" << ++lineCount << "): " << *source <<endl);
staticData.InitializeBeforeSentenceProcessing(*source);
Manager manager(*source, staticData);
@ -135,7 +136,7 @@ int main(int argc, char* argv[])
}
if (staticData.IsDetailedTranslationReportingEnabled()) {
TranslationAnalysis::PrintTranslationAnalysis(std::cout, manager.GetBestHypothesis());
TranslationAnalysis::PrintTranslationAnalysis(std::cerr, manager.GetBestHypothesis());
}
staticData.CleanUpAfterSentenceProcessing();
}