diff options
Diffstat (limited to 'python/src/sa/rulefactory.pxi')
-rw-r--r-- | python/src/sa/rulefactory.pxi | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/src/sa/rulefactory.pxi b/python/src/sa/rulefactory.pxi index 233654e9..3973554c 100644 --- a/python/src/sa/rulefactory.pxi +++ b/python/src/sa/rulefactory.pxi @@ -1101,9 +1101,8 @@ cdef class HieroCachingRuleFactory: for f, elist in fphrases.iteritems(): for e, alslist in elist.iteritems(): alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) - locs = tuple(itertools.chain(alslist.itervalues())) - # count = len(locs) # Should be? - count = len(max_locs) # Was + locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) + count = len(locs) scores = self.scorer.score(FeatureContext( f, e, count, fcount[f], num_samples, (k,i+spanlen), locs, fwords, self.fda, self.eda |