summaryrefslogtreecommitdiff
path: root/decoder/aligner.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-12 03:42:39 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-12 03:42:39 +0000
commit11980f43455a85f31f2941f570f9a3a1ff925408 (patch)
tree63da64240f578906162c9941ccdbfea40304d497 /decoder/aligner.cc
parent35da16a3177f94fcff97c319344ced8407b69ffb (diff)
inebriated, but sped up inside/outside pruning and made cube poplimit scale with promise of nodes from previous global pruning, if --promise_power=N for N>0.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@219 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/aligner.cc')
-rw-r--r--decoder/aligner.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/decoder/aligner.cc b/decoder/aligner.cc
index bad97b74..d498c22c 100644
--- a/decoder/aligner.cc
+++ b/decoder/aligner.cc
@@ -86,7 +86,7 @@ void SourceEdgeCoveragesUsingParseIndices(const Hypergraph& g,
vector<set<int> >* src_cov) {
src_cov->clear();
src_cov->resize(g.edges_.size());
-
+
for (int i = 0; i < g.edges_.size(); ++i) {
const Hypergraph::Edge& edge = g.edges_[i];
set<int>& cov = (*src_cov)[i];
@@ -212,6 +212,7 @@ void TargetEdgeCoveragesUsingTree(const Hypergraph& g,
}
struct TransitionEventWeightFunction {
+ typedef SparseVector<prob_t> Result;
inline SparseVector<prob_t> operator()(const Hypergraph::Edge& e) const {
SparseVector<prob_t> result;
result.set_value(e.id_, e.edge_prob_);
@@ -261,7 +262,7 @@ void AlignerTools::WriteAlignment(const Lattice& src_lattice,
if (edges || !map_instead_of_viterbi) {
for (int i = 0; i < edge_posteriors.size(); ++i)
edge_posteriors[i] = prob_t::One();
- } else {
+ } else {
SparseVector<prob_t> posts;
const prob_t z = InsideOutside<prob_t, EdgeProb, SparseVector<prob_t>, TransitionEventWeightFunction>(*g, &posts);
for (int i = 0; i < edge_posteriors.size(); ++i)