diff options
author | Michael Denkowski <michael.j.denkowski@gmail.com> | 2015-04-03 23:49:41 +0300 |
---|---|---|
committer | Michael Denkowski <michael.j.denkowski@gmail.com> | 2015-04-03 23:49:41 +0300 |
commit | fdf4f5f5718cd10e76081e525aea8c62d421f3c7 (patch) | |
tree | b16ac72ebb32ce6a737aedfc464acd27f4b048dd /moses | |
parent | 0c58e194916af166372903a932cb459bb46aa124 (diff) |
Consistent line ending behavior for alignment printing options
Diffstat (limited to 'moses')
-rw-r--r-- | moses/Hypothesis.cpp | 4 | ||||
-rw-r--r-- | moses/Manager.cpp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp index 3707aed18..79a469523 100644 --- a/moses/Hypothesis.cpp +++ b/moses/Hypothesis.cpp @@ -484,9 +484,7 @@ namespace Moses targetOffset += tp.GetSize(); } - // Removing std::endl here breaks -alignment-output-file, so stop doing that, please :) - // Or fix it somewhere else. - out << std::endl; + // Used by --print-alignment-info, so no endl } void diff --git a/moses/Manager.cpp b/moses/Manager.cpp index 0e8d5758a..da0661aee 100644 --- a/moses/Manager.cpp +++ b/moses/Manager.cpp @@ -1868,8 +1868,7 @@ void Manager::OutputAlignment(ostream &out, const vector<const Hypothesis *> &ed targetOffset += tp.GetSize(); } - // Removing std::endl here breaks -alignment-output-file, so stop doing that, please :) - // Or fix it somewhere else. + // Used by --alignment-output-file so requires endl out << std::endl; } @@ -2024,6 +2023,8 @@ void Manager::OutputBestHypo(const Moses::TrellisPath &path, long /*translationI void Manager::OutputAlignment(std::ostringstream &out, const TrellisPath &path) const { Hypothesis::OutputAlignment(out, path.GetEdges()); + // Used by --alignment-output-file so requires endl + out << std::endl; } } // namespace |