summaryrefslogtreecommitdiff
path: root/training/candidate_set.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-05-29 21:39:22 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-05-29 21:39:22 -0400
commit317d650f6cb1e24ac6f3be6f7bf9d4246a59e0e5 (patch)
tree02a8217d6910453049d5a2b96d3214baf19737c5 /training/candidate_set.cc
parent6b7f7ae44228221b3de158035d190940ff677de1 (diff)
add support to rampion for accumulating k-best lists
Diffstat (limited to 'training/candidate_set.cc')
-rw-r--r--training/candidate_set.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/training/candidate_set.cc b/training/candidate_set.cc
index e2ca9ad2..8c086ece 100644
--- a/training/candidate_set.cc
+++ b/training/candidate_set.cc
@@ -112,7 +112,7 @@ void CandidateSet::WriteToFile(const string& file) const {
for (unsigned i = 0; i < cs.size(); ++i) {
out << TD::GetString(cs[i].ewords) << endl;
out << cs[i].fmap << endl;
- cs[i].score_stats.Encode(&ss);
+ cs[i].eval_feats.Encode(&ss);
out << ss << endl;
}
}
@@ -131,7 +131,7 @@ void CandidateSet::ReadFromFile(const string& file) {
cs.push_back(Candidate());
TD::ConvertSentence(cand, &cs.back().ewords);
ParseSparseVector(feats, 0, &cs.back().fmap);
- cs.back().score_stats = SufficientStats(ss);
+ cs.back().eval_feats = SufficientStats(ss);
}
cerr << " read " << cs.size() << " candidates\n";
}
@@ -160,7 +160,7 @@ void CandidateSet::AddKBestCandidates(const Hypergraph& hg, size_t kbest_size, c
if (!d) break;
cs.push_back(Candidate(d->yield, d->feature_values));
if (scorer)
- scorer->Evaluate(d->yield, &cs.back().score_stats);
+ scorer->Evaluate(d->yield, &cs.back().eval_feats);
}
Dedup();
}