diff options
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/IOWrapper.cpp | 18 | ||||
-rw-r--r-- | moses-cmd/LatticeMBRGrid.cpp | 2 | ||||
-rw-r--r-- | moses-cmd/Main.cpp | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/moses-cmd/IOWrapper.cpp b/moses-cmd/IOWrapper.cpp index da2589acd..3e55f96e9 100644 --- a/moses-cmd/IOWrapper.cpp +++ b/moses-cmd/IOWrapper.cpp @@ -168,16 +168,16 @@ void IOWrapper::Initialization(const std::vector<FactorType> &/*inputFactorOrder const std::string &path = staticData.GetDetailedTranslationReportingFilePath(); m_detailedTranslationReportingStream = new std::ofstream(path.c_str()); UTIL_THROW_IF(!m_detailedTranslationReportingStream->good(), - util::FileOpenException, - "File for output of detailed translation report could not be open"); + util::FileOpenException, + "File for output of detailed translation report could not be open"); } // sentence alignment output if (! staticData.GetAlignmentOutputFile().empty()) { m_alignmentOutputStream = new ofstream(staticData.GetAlignmentOutputFile().c_str()); UTIL_THROW_IF(!m_alignmentOutputStream->good(), - util::FileOpenException, - "File for output of word alignment could not be open"); + util::FileOpenException, + "File for output of word alignment could not be open"); } } @@ -208,7 +208,7 @@ std::map<size_t, const Factor*> GetPlaceholders(const Hypothesis &hypo, FactorTy if (factor) { std::set<size_t> targetPos = hypo.GetTranslationOption().GetTargetPhrase().GetAlignTerm().GetAlignmentsForSource(sourcePos); UTIL_THROW_IF2(targetPos.size() != 1, - "Placeholder should be aligned to 1, and only 1, word"); + "Placeholder should be aligned to 1, and only 1, word"); ret[*targetPos.begin()] = factor; } } @@ -223,7 +223,7 @@ void OutputSurface(std::ostream &out, const Hypothesis &edge, const std::vector< char reportSegmentation, bool reportAllFactors) { UTIL_THROW_IF2(outputFactorOrder.size() == 0, - "Must specific at least 1 output factor"); + "Must specific at least 1 output factor"); const TargetPhrase& phrase = edge.GetCurrTargetPhrase(); bool markUnknown = StaticData::Instance().GetMarkUnknown(); if (reportAllFactors == true) { @@ -250,7 +250,7 @@ void OutputSurface(std::ostream &out, const Hypothesis &edge, const std::vector< } UTIL_THROW_IF2(factor == NULL, - "No factor 0 at position " << pos); + "No factor 0 at position " << pos); //preface surface form with UNK if marking unknowns const Word &word = phrase.GetWord(pos); @@ -263,7 +263,7 @@ void OutputSurface(std::ostream &out, const Hypothesis &edge, const std::vector< for (size_t i = 1 ; i < outputFactorOrder.size() ; i++) { const Factor *factor = phrase.GetFactor(pos, outputFactorOrder[i]); UTIL_THROW_IF2(factor == NULL, - "No factor " << i << " at position " << pos); + "No factor " << i << " at position " << pos); out << "|" << *factor; } @@ -399,7 +399,7 @@ void OutputBestHypo(const std::vector<Word>& mbrBestHypo, long /*translationId* for (size_t i = 0 ; i < mbrBestHypo.size() ; i++) { const Factor *factor = mbrBestHypo[i].GetFactor(StaticData::Instance().GetOutputFactorOrder()[0]); UTIL_THROW_IF2(factor == NULL, - "No factor 0 at position " << i); + "No factor 0 at position " << i); if (i>0) out << " " << *factor; else out << *factor; } diff --git a/moses-cmd/LatticeMBRGrid.cpp b/moses-cmd/LatticeMBRGrid.cpp index 4c6b421fc..39d88f34d 100644 --- a/moses-cmd/LatticeMBRGrid.cpp +++ b/moses-cmd/LatticeMBRGrid.cpp @@ -70,7 +70,7 @@ public: void addParam(gridkey key, const string& arg, float defaultValue) { m_args[arg] = key; UTIL_THROW_IF2(m_grid.find(key) != m_grid.end(), - "Couldn't find value for key " << (int) key); + "Couldn't find value for key " << (int) key); m_grid[key].push_back(defaultValue); } diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp index eb4f20e0d..220b72a94 100644 --- a/moses-cmd/Main.cpp +++ b/moses-cmd/Main.cpp @@ -307,9 +307,9 @@ public: out << m_source->GetTranslationId() << " "; } - if (staticData.GetReportSegmentation() == 2) { - manager.GetOutputLanguageModelOrder(out, bestHypo); - } + if (staticData.GetReportSegmentation() == 2) { + manager.GetOutputLanguageModelOrder(out, bestHypo); + } OutputBestSurface( out, bestHypo, |