Moses::WordPenaltyProducer Class Reference

#include <DummyScoreProducers.h>

Inheritance diagram for Moses::WordPenaltyProducer:

Inheritance graph
[legend]
Collaboration diagram for Moses::WordPenaltyProducer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 WordPenaltyProducer (ScoreIndexManager &scoreIndexManager)
size_t GetNumScoreComponents () const
std::string GetScoreProducerDescription (unsigned) const
 returns a string description of this producer
std::string GetScoreProducerWeightShortName (unsigned) const
 returns the weight parameter name of this producer (used in n-best list)
size_t GetNumInputScores () const
 returns the number of scores gathered from the input (0 by default)
virtual void Evaluate (const TargetPhrase &phrase, ScoreComponentCollection *out) const
 Evaluate for stateless feature functions. Implement this.


Detailed Description

Doesn't do anything but provide a key into the global score array to store the word penalty in.

Definition at line 47 of file DummyScoreProducers.h.


Constructor & Destructor Documentation

Moses::WordPenaltyProducer::WordPenaltyProducer ( ScoreIndexManager scoreIndexManager  ) 

Definition at line 112 of file DummyScoreProducers.cpp.

References Moses::ScoreIndexManager::AddScoreProducer().

Here is the call graph for this function:


Member Function Documentation

void Moses::WordPenaltyProducer::Evaluate ( const TargetPhrase cur_hypo,
ScoreComponentCollection accumulator 
) const [virtual]

Evaluate for stateless feature functions. Implement this.

Reimplemented from Moses::StatelessFeatureFunction.

Definition at line 137 of file DummyScoreProducers.cpp.

References Moses::Phrase::GetSize(), and Moses::ScoreComponentCollection::PlusEquals().

Here is the call graph for this function:

size_t Moses::WordPenaltyProducer::GetNumInputScores (  )  const [virtual]

returns the number of scores gathered from the input (0 by default)

Reimplemented from Moses::ScoreProducer.

Definition at line 132 of file DummyScoreProducers.cpp.

size_t Moses::WordPenaltyProducer::GetNumScoreComponents (  )  const [virtual]

returns the number of scores that a subclass produces. For example, a language model conventionally produces 1, a translation table some arbitrary number, etc

Implements Moses::ScoreProducer.

Definition at line 117 of file DummyScoreProducers.cpp.

std::string Moses::WordPenaltyProducer::GetScoreProducerDescription ( unsigned  idx  )  const [virtual]

returns a string description of this producer

Implements Moses::ScoreProducer.

Definition at line 122 of file DummyScoreProducers.cpp.

std::string Moses::WordPenaltyProducer::GetScoreProducerWeightShortName ( unsigned  idx  )  const [virtual]

returns the weight parameter name of this producer (used in n-best list)

Implements Moses::ScoreProducer.

Definition at line 127 of file DummyScoreProducers.cpp.


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

Generated on Wed Feb 8 23:04:10 2012 for Moses by  doxygen 1.5.9