2013-05-25 02:57:06 +04:00
|
|
|
#pragma once
|
|
|
|
|
2013-05-25 03:25:20 +04:00
|
|
|
#include <string>
|
|
|
|
#include "StatelessFeatureFunction.h"
|
2013-06-11 04:46:04 +04:00
|
|
|
#include "util/check.hh"
|
2013-05-25 03:25:20 +04:00
|
|
|
|
2013-05-25 02:57:06 +04:00
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
class TargetPhrase;
|
|
|
|
class ScoreComponentCollection;
|
|
|
|
|
|
|
|
class WordPenaltyProducer : public StatelessFeatureFunction
|
|
|
|
{
|
|
|
|
public:
|
2013-06-20 15:50:41 +04:00
|
|
|
WordPenaltyProducer(const std::string &line);
|
2013-05-25 02:57:06 +04:00
|
|
|
|
2013-05-30 15:51:40 +04:00
|
|
|
bool IsUseable(const FactorMask &mask) const {
|
|
|
|
return true;
|
|
|
|
}
|
2013-05-30 15:41:08 +04:00
|
|
|
|
2013-05-28 13:51:28 +04:00
|
|
|
virtual void Evaluate(const Phrase &source
|
2013-05-29 21:16:15 +04:00
|
|
|
, const TargetPhrase &targetPhrase
|
|
|
|
, ScoreComponentCollection &scoreBreakdown
|
|
|
|
, ScoreComponentCollection &estimatedFutureScore) const;
|
2013-05-25 02:57:06 +04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|