update decoder

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mira-mtm5@3795 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
evahasler 2011-01-10 14:26:06 +00:00
parent 67d42f0ef9
commit 9fbb722f9c
2 changed files with 12 additions and 12 deletions

View File

@ -104,8 +104,7 @@ namespace Mira {
vector< float>& bleuScores,
bool oracle,
bool distinct,
bool ignoreUWeight,
size_t rank)
bool ignoreUWeight)
{
StaticData &staticData = StaticData::InstanceNonConst();
@ -144,15 +143,17 @@ namespace Mira {
//std::cout << "Score breakdown: " << path.GetScoreBreakdown() << endl;
float scoreWithoutBleu = path.GetTotalScore() - bleuObjectiveWeight * bleuScore;
cerr << "Total score: " << path.GetTotalScore() << ", Score w/o bleu: " << scoreWithoutBleu << ", Bleu: " << bleuScore << endl;
//if (distinct) {
Phrase bestPhrase = path.GetTargetPhrase();
cerr << "Rank " << rank << ": ";
Phrase phrase = path.GetTargetPhrase();
for (size_t pos = 0; pos < phrase.GetSize(); ++pos) {
const Word &word = phrase.GetWord(pos);
Word *newWord = new Word(word);
cerr << *newWord << " ";
}
cerr << endl;
for (size_t pos = 0; pos < bestPhrase.GetSize(); ++pos) {
const Word &word = bestPhrase.GetWord(pos);
Word *newWord = new Word(word);
cerr << *newWord << " ";
}
cerr << endl;
//}
// set bleu score to zero in the feature vector since we do not want to optimise its weight
setBleuScore(featureValues.back(), 0);

View File

@ -62,8 +62,7 @@ class MosesDecoder {
std::vector< float>& scores,
bool oracle,
bool distinct,
bool ignoreUWeight,
size_t rank);
bool ignoreUWeight);
size_t getCurrentInputLength();
void updateHistory(const std::vector<const Moses::Word*>& words);
void updateHistory(const std::vector< std::vector< const Moses::Word*> >& words, std::vector<size_t>& sourceLengths, std::vector<size_t>& ref_ids);