diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
commit | 6249432407af8730c10bccc7894c0725fcaf5e47 (patch) | |
tree | 3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /mert/BleuScorer.h | |
parent | 59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff) |
beautify
Diffstat (limited to 'mert/BleuScorer.h')
-rw-r--r-- | mert/BleuScorer.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mert/BleuScorer.h b/mert/BleuScorer.h index af889b13e..248b3e1d1 100644 --- a/mert/BleuScorer.h +++ b/mert/BleuScorer.h @@ -38,14 +38,22 @@ public: virtual void setReferenceFiles(const std::vector<std::string>& referenceFiles); virtual void prepareStats(std::size_t sid, const std::string& text, ScoreStats& entry); virtual statscore_t calculateScore(const std::vector<int>& comps) const; - virtual std::size_t NumberOfScores() const { return 2 * kBleuNgramOrder + 1; } + virtual std::size_t NumberOfScores() const { + return 2 * kBleuNgramOrder + 1; + } int CalcReferenceLength(std::size_t sentence_id, std::size_t length); - ReferenceLengthType GetReferenceLengthType() const { return m_ref_length_type; } - void SetReferenceLengthType(ReferenceLengthType type) { m_ref_length_type = type; } + ReferenceLengthType GetReferenceLengthType() const { + return m_ref_length_type; + } + void SetReferenceLengthType(ReferenceLengthType type) { + m_ref_length_type = type; + } - const std::vector<Reference*>& GetReferences() const { return m_references.get(); } + const std::vector<Reference*>& GetReferences() const { + return m_references.get(); + } /** * Count the ngrams of each type, up to the given length in the input line. @@ -74,7 +82,7 @@ private: * This function is used in PRO. */ float smoothedSentenceBleu - (const std::vector<float>& stats, float smoothing=1.0, bool smoothBP=false); +(const std::vector<float>& stats, float smoothing=1.0, bool smoothBP=false); /** Computes sentence-level BLEU score given a background corpus. * This function is used in batch MIRA. |