diff options
Diffstat (limited to 'python/cdec/sa/extractor.py')
-rw-r--r-- | python/cdec/sa/extractor.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/cdec/sa/extractor.py b/python/cdec/sa/extractor.py index 23534712..5a95ded8 100644 --- a/python/cdec/sa/extractor.py +++ b/python/cdec/sa/extractor.py @@ -98,3 +98,7 @@ class GrammarExtractor: e_words = cdec.sa.encode_words(reference.split()) al = sorted(tuple(int(i) for i in pair.split('-')) for pair in alignment.split()) self.factory.add_instance(f_words, e_words, al, ctx_name) + + # Remove all incremental data for a context + def drop_ctx(self, ctx_name=None): + self.factory.drop_ctx(ctx_name) |