2013-09-13 20:23:24 +04:00
|
|
|
#include "InternalStructStatelessFF.h"
|
|
|
|
#include "moses/InputPath.h"
|
2013-09-13 21:43:04 +04:00
|
|
|
#include "moses/ScoreComponentCollection.h"
|
2013-09-13 20:23:24 +04:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
namespace Moses
|
|
|
|
{
|
2013-09-13 21:43:04 +04:00
|
|
|
void InternalStructStatelessFF::Evaluate(const Phrase &source
|
|
|
|
, const TargetPhrase &targetPhrase
|
|
|
|
, ScoreComponentCollection &scoreBreakdown
|
|
|
|
, ScoreComponentCollection &estimatedFutureScore) const
|
|
|
|
{
|
|
|
|
// cerr << "MARIA!!!" << endl;
|
2013-09-14 12:44:35 +04:00
|
|
|
scoreBreakdown.PlusEquals(this, 0);
|
2013-09-13 21:43:04 +04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-09-13 20:23:24 +04:00
|
|
|
void InternalStructStatelessFF::Evaluate(const InputType &input
|
|
|
|
, const InputPath &inputPath
|
2013-09-29 19:01:03 +04:00
|
|
|
, const TargetPhrase &targetPhrase
|
2013-09-13 20:23:24 +04:00
|
|
|
, ScoreComponentCollection &scoreBreakdown) const
|
|
|
|
{
|
2013-09-13 21:43:04 +04:00
|
|
|
|
2013-09-14 12:44:35 +04:00
|
|
|
cerr << "HHHHH" << scoreBreakdown << endl;
|
|
|
|
scoreBreakdown.PlusEquals(this, 66);
|
|
|
|
/* FactorList f_mask;
|
2013-09-13 20:23:24 +04:00
|
|
|
f_mask.push_back(0);
|
|
|
|
//if(inputPath.GetPhrase().GetStringRep(f_mask).)
|
2013-09-14 12:44:35 +04:00
|
|
|
int score =50;
|
2013-09-13 20:23:24 +04:00
|
|
|
for(size_t i=0;i<inputPath.GetPhrase().GetSize();i++){
|
|
|
|
if(inputPath.GetPhrase(). GetFactor(i,0)->GetString().as_string()=="ist"){
|
2013-09-13 21:43:04 +04:00
|
|
|
//cout<<inputPath.GetPhrase().GetStringRep(f_mask);
|
|
|
|
score+=1;
|
2013-09-13 20:23:24 +04:00
|
|
|
}
|
|
|
|
}
|
2013-09-13 21:43:04 +04:00
|
|
|
scoreBreakdown.PlusEquals(this, score);
|
2013-09-14 12:44:35 +04:00
|
|
|
*/
|
2013-09-13 20:23:24 +04:00
|
|
|
}
|
2013-09-14 12:44:35 +04:00
|
|
|
|
2013-09-13 20:23:24 +04:00
|
|
|
}
|
|
|
|
|