diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-06 04:43:17 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-06 04:43:17 +0300 |
commit | d56d900d6ab5f2cdadbba41dae56de3f19d5d04e (patch) | |
tree | 21800a596c7806cba7086a9e919371491339e9e0 /moses/server | |
parent | cf3aef756359788a91e431b568af45d3ecd0b7a6 (diff) |
Code cleanup.
Diffstat (limited to 'moses/server')
-rw-r--r-- | moses/server/TranslationRequest.cpp | 6 | ||||
-rw-r--r-- | moses/server/TranslationRequest.h | 13 |
2 files changed, 10 insertions, 9 deletions
diff --git a/moses/server/TranslationRequest.cpp b/moses/server/TranslationRequest.cpp index 694dc1d36..dc6a571ec 100644 --- a/moses/server/TranslationRequest.cpp +++ b/moses/server/TranslationRequest.cpp @@ -89,7 +89,8 @@ void TranslationRequest:: add_phrase_aln_info(Hypothesis const& h, vector<xmlrpc_c::value>& aInfo) const { - if (!m_withAlignInfo) return; + // if (!m_withAlignInfo) return; + if (!options().output.ReportSegmentation) return; Range const& trg = h.GetCurrTargetWordsRange(); Range const& src = h.GetCurrSourceWordsRange(); @@ -337,7 +338,8 @@ run_chart_decoder() void TranslationRequest:: -pack_hypothesis(const Moses::Manager& manager, vector<Hypothesis const* > const& edges, string const& key, +pack_hypothesis(const Moses::Manager& manager, + vector<Hypothesis const* > const& edges, string const& key, map<string, xmlrpc_c::value> & dest) const { // target string diff --git a/moses/server/TranslationRequest.h b/moses/server/TranslationRequest.h index 7fb122714..2554e5544 100644 --- a/moses/server/TranslationRequest.h +++ b/moses/server/TranslationRequest.h @@ -38,8 +38,8 @@ TranslationRequest : public virtual Moses::TranslationTask Translator* m_translator; std::string m_source_string, m_target_string; - bool m_withAlignInfo; - bool m_withWordAlignInfo; + // bool m_withAlignInfo; + // bool m_withWordAlignInfo; bool m_withGraphInfo; bool m_withTopts; bool m_withScoreBreakdown; @@ -58,17 +58,16 @@ TranslationRequest : public virtual Moses::TranslationTask run_phrase_decoder(); void - pack_hypothesis(const Moses::Manager& manager, std::vector<Moses::Hypothesis const* > const& edges, + pack_hypothesis(const Moses::Manager& manager, + std::vector<Moses::Hypothesis const* > const& edges, std::string const& key, std::map<std::string, xmlrpc_c::value> & dest) const; void - pack_hypothesis(const Moses::Manager& manager, Moses::Hypothesis const* h, std::string const& key, + pack_hypothesis(const Moses::Manager& manager, Moses::Hypothesis const* h, + std::string const& key, std::map<std::string, xmlrpc_c::value> & dest) const; - // void - // output_phrase(std::ostream& out, Moses::Phrase const& phrase) const; - void add_phrase_aln_info(Moses::Hypothesis const& h, std::vector<xmlrpc_c::value>& aInfo) const; |