StatisticsBasedScorer Class Reference

#include <StatisticsBasedScorer.h>

Inheritance diagram for StatisticsBasedScorer:

Inheritance graph
[legend]
Collaboration diagram for StatisticsBasedScorer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 StatisticsBasedScorer (const std::string &name, const std::string &config)
virtual ~StatisticsBasedScorer ()
virtual void score (const candidates_t &candidates, const diffs_t &diffs, statscores_t &scores) const

Protected Types

enum  RegularisationType { NONE, AVERAGE, MINIMUM }

Protected Member Functions

virtual statscore_t calculateScore (const std::vector< int > &totals) const =0

Protected Attributes

RegularisationType m_regularization_type
std::size_t m_regularization_window


Detailed Description

Abstract base class for Scorers that work by adding statistics across all outout sentences, then apply some formula, e.g., BLEU, PER.

Definition at line 17 of file StatisticsBasedScorer.h.


Member Enumeration Documentation

Enumerator:
NONE 
AVERAGE 
MINIMUM 

Definition at line 27 of file StatisticsBasedScorer.h.


Constructor & Destructor Documentation

StatisticsBasedScorer::StatisticsBasedScorer ( const std::string &  name,
const std::string &  config 
)

virtual StatisticsBasedScorer::~StatisticsBasedScorer (  )  [inline, virtual]

Definition at line 21 of file StatisticsBasedScorer.h.


Member Function Documentation

virtual statscore_t StatisticsBasedScorer::calculateScore ( const std::vector< int > &  totals  )  const [protected, pure virtual]

Calculate the actual score.

Implemented in BleuScorer, CderScorer, MergeScorer, PermutationScorer, PerScorer, SemposScorer, and TerScorer.

Referenced by score().

Here is the caller graph for this function:

void StatisticsBasedScorer::score ( const candidates_t candidates,
const diffs_t diffs,
statscores_t scores 
) const [virtual]

Score using each of the candidate index, then go through the diffs applying each in turn, and calculating a new score each time.

Implements Scorer.

Definition at line 51 of file StatisticsBasedScorer.cpp.

References AVERAGE, calculateScore(), end, ScoreArray::get(), ScoreStats::get(), ScoreData::get(), m_regularization_type, m_regularization_window, Scorer::m_score_data, NONE, ScoreStats::size(), ScoreArray::size(), ScoreData::size(), and Moses::stats.

Here is the call graph for this function:


Member Data Documentation

Definition at line 39 of file StatisticsBasedScorer.h.

Referenced by score().

Definition at line 40 of file StatisticsBasedScorer.h.

Referenced by score().


The documentation for this class was generated from the following files:

Generated on Sat Jun 30 00:30:12 2012 for Moses by  doxygen 1.5.9