summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-03-10 15:55:02 +0100
committerPatrick Simianer <p@simianer.de>2016-03-10 15:55:02 +0100
commite96dfde0014c552922e866a56b31335ff894b8a0 (patch)
treef951e1bc022e208ea6d733bfaf5a83faa81fa57f
parent3adfda72d6c2e63dbc62a1111e17f59326970cb7 (diff)
don't waste time
-rw-r--r--training/dtrain/dtrain_net_interface.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/training/dtrain/dtrain_net_interface.cc b/training/dtrain/dtrain_net_interface.cc
index f2f200ef..8dcc3d27 100644
--- a/training/dtrain/dtrain_net_interface.cc
+++ b/training/dtrain/dtrain_net_interface.cc
@@ -87,6 +87,8 @@ main(int argc, char** argv)
string done = "done";
+ vector<ScoredHyp>* samples;
+
size_t i = 0;
while(true)
{
@@ -214,7 +216,7 @@ main(int argc, char** argv)
observer->dont_score = true;
decoder.Decode(parts[1], observer);
observer->dont_score = false;
- vector<ScoredHyp>* samples = observer->GetSamples();
+ samples = observer->GetSamples();
ostringstream os;
cerr << "[dtrain] 1best features " << (*samples)[0].f << endl;
if (output_derivation) {
@@ -247,6 +249,10 @@ main(int argc, char** argv)
refs.emplace_back(MakeNgrams(r, N));
rsz.push_back(r.size());
}
+
+ //vector<ScoredHyp>* samples;
+ for (auto s: *samples)
+ s.gold = observer->scorer_->Score(s.w, refs, rsz);
}
}
}
@@ -256,9 +262,9 @@ main(int argc, char** argv)
// decode
lambdas.init_vector(&decoder_weights);
- observer->SetReference(refs, rsz);
- decoder.Decode(source, observer);
- vector<ScoredHyp>* samples = observer->GetSamples();
+ //observer->SetReference(refs, rsz);
+ //decoder.Decode(source, observer);
+ //vector<ScoredHyp>* samples = observer->GetSamples();
// debug --
debug_output << "\"1best\":\"";