diff options
author | Michael Denkowski <michael.j.denkowski@gmail.com> | 2013-01-28 14:21:22 -0500 |
---|---|---|
committer | Michael Denkowski <michael.j.denkowski@gmail.com> | 2013-01-28 14:21:22 -0500 |
commit | 143afb1e6210ae6105426d47d7f225cbfa695753 (patch) | |
tree | 241db8508ebf72c2767751cbc92257a680bfff3c /python/src/sa/rulefactory.pxi | |
parent | 5e7a99f9ce09a31092e194c06dd51368e18b3aed (diff) |
Bilexical scores for online rules
Diffstat (limited to 'python/src/sa/rulefactory.pxi')
-rw-r--r-- | python/src/sa/rulefactory.pxi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/src/sa/rulefactory.pxi b/python/src/sa/rulefactory.pxi index 88f77a8d..7063c2da 100644 --- a/python/src/sa/rulefactory.pxi +++ b/python/src/sa/rulefactory.pxi @@ -31,7 +31,9 @@ OnlineFeatureContext = namedtuple('OnlineFeatureContext', ['fcount', 'fsample_count', 'paircount', - 'bilex' + 'bilex_f', + 'bilex_e', + 'bilex_fe' ]) cdef int PRECOMPUTE = 0 @@ -2150,7 +2152,7 @@ cdef class HieroCachingRuleFactory: fsample_count = self.samples_f.get(f, 0) d = self.phrases_fe.get(f, None) paircount = d.get(e, 0) if d else 0 - return OnlineFeatureContext(fcount, fsample_count, paircount, self.bilex_fe) + return OnlineFeatureContext(fcount, fsample_count, paircount, self.bilex_f, self.bilex_e, self.bilex_fe) return None # Find all phrases that we might try to extract |