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