summaryrefslogtreecommitdiff
path: root/python/cdec/sa/rulefactory.pxi
diff options
context:
space:
mode:
Diffstat (limited to 'python/cdec/sa/rulefactory.pxi')
-rw-r--r--python/cdec/sa/rulefactory.pxi4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/cdec/sa/rulefactory.pxi b/python/cdec/sa/rulefactory.pxi
index a96b01e7..2be5cad6 100644
--- a/python/cdec/sa/rulefactory.pxi
+++ b/python/cdec/sa/rulefactory.pxi
@@ -2181,6 +2181,10 @@ cdef class HieroCachingRuleFactory:
extract(f_i, f_i, f_len, -1, 0, 0, [])
return phrases
+
+ # Drop online stats for a context
+ def drop_ctx(self, ctx_name=None):
+ self.online_stats.pop(ctx_name, None)
# Spans are _inclusive_ on both ends [i, j]
def span_check(vec, i, j):