diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 22:51:33 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 22:51:33 +0000 |
commit | a2e4142d6a737bff040c3f2a583da6e8244db01a (patch) | |
tree | dce70b212c143f3149c8280698ee5abce7fd6cda /decoder/ff_bleu.cc | |
parent | 1b606343b7368aa4c61d5088b22b8916486f0073 (diff) |
shared_ptr for scores. todo: intrusive.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@327 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_bleu.cc')
-rw-r--r-- | decoder/ff_bleu.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/decoder/ff_bleu.cc b/decoder/ff_bleu.cc index f8d62aa2..19564bd0 100644 --- a/decoder/ff_bleu.cc +++ b/decoder/ff_bleu.cc @@ -182,7 +182,8 @@ class BLEUModelImpl { cerr << ")\n"; */ - Score *node_score = smeta.GetDocScorer()[smeta.GetSentenceID()]->ScoreCCandidate(vs); + ScoreP node_score_p = smeta.GetDocScorer()[smeta.GetSentenceID()]->ScoreCCandidate(vs); + Score *node_score=node_score_p.get(); string details; node_score->ScoreDetails(&details); const Score *base_score= &smeta.GetScore(); @@ -194,6 +195,7 @@ class BLEUModelImpl { //how it seems to be done in code //TODO: might need to reverse the -1/+1 of the oracle/neg examples + //TO VLADIMIR: the polarity would be reversed if you switched error (1-BLEU) for BLEU. approx_bleu = ( rule.FWords() * oracledoc_factor ) * node_score->ComputeScore(); //how I thought it was done from the paper //approx_bleu = ( rule.FWords()+ smeta.GetDocLen() ) * node_score->ComputeScore(); @@ -277,7 +279,7 @@ void BLEUModel::TraversalFeaturesImpl(const SentenceMetadata& smeta, const DocScorer *ds = &smeta.GetDocScorer(); */ - cerr<< "Loading sentence " << smeta.GetSentenceID() << endl; +// cerr<< "ff_bleu loading sentence " << smeta.GetSentenceID() << endl; //} features->set_value(fid_, pimpl_->LookupWords(*edge.rule_, ant_states, state, smeta)); //cerr << "FID" << fid_ << " " << DebugStateToString(state) << endl; |