diff options
Diffstat (limited to 'moses/src/BleuScoreFeature.cpp')
-rw-r--r--[-rwxr-xr-x] | moses/src/BleuScoreFeature.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/moses/src/BleuScoreFeature.cpp b/moses/src/BleuScoreFeature.cpp index a0f4df200..8ba979742 100755..100644 --- a/moses/src/BleuScoreFeature.cpp +++ b/moses/src/BleuScoreFeature.cpp @@ -22,11 +22,28 @@ int BleuScoreState::Compare(const FFState& o) const if (&o == this) return 0; + const StaticData &staticData = StaticData::Instance(); + SearchAlgorithm searchAlgorithm = staticData.GetSearchAlgorithm(); + bool chartDecoding = (searchAlgorithm == ChartDecoding); + if (chartDecoding) + return 0; + const BleuScoreState& other = dynamic_cast<const BleuScoreState&>(o); int c = m_words.Compare(other.m_words); if (c != 0) return c; + /*for(size_t i = 0; i < m_ngram_counts.size(); i++) { + if (m_ngram_counts[i] < other.m_ngram_counts[i]) + return -1; + if (m_ngram_counts[i] > other.m_ngram_counts[i]) + return 1; + if (m_ngram_matches[i] < other.m_ngram_matches[i]) + return -1; + if (m_ngram_matches[i] > other.m_ngram_matches[i]) + return 1; + }*/ + return 0; } std::ostream& operator<<(std::ostream& out, const BleuScoreState& state) { |