diff options
author | Adam Lopez <alopez@cs.jhu.edu> | 2012-09-06 03:27:34 -0400 |
---|---|---|
committer | Adam Lopez <alopez@cs.jhu.edu> | 2012-09-06 03:27:34 -0400 |
commit | 86b272c97ed8b608f2411c96b8eec57c7e3f0470 (patch) | |
tree | 72da5f7601a731851b53d371d032ff0a8741d81e /python/src/sa/rulefactory.pxi | |
parent | f99b04588d3725f28d13dcdfcbc0846cc1c52321 (diff) | |
parent | dba6e87082501a66d8c444ebcd7ed6bd756aaf23 (diff) |
Merge
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 |