mosesdecoder/moses/FF/InternalStructStatelessFF.cpp

42 lines
1.2 KiB
C++
Raw Normal View History

#include "InternalStructStatelessFF.h"
#include "moses/InputPath.h"
2013-09-13 21:43:04 +04:00
#include "moses/ScoreComponentCollection.h"
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
}
void InternalStructStatelessFF::Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, 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;
f_mask.push_back(0);
//if(inputPath.GetPhrase().GetStringRep(f_mask).)
2013-09-14 12:44:35 +04:00
int score =50;
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 21:43:04 +04:00
scoreBreakdown.PlusEquals(this, score);
2013-09-14 12:44:35 +04:00
*/
}
2013-09-14 12:44:35 +04:00
}