From 32c356e5dd29b6d0ade9423043a44fb52b5e1653 Mon Sep 17 00:00:00 2001 From: "philblunsom@gmail.com" Date: Tue, 29 Jun 2010 22:38:22 +0000 Subject: Added singleton filter. git-svn-id: https://ws10smt.googlecode.com/svn/trunk@70 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/pyp-topics/src/train-contexts.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gi/pyp-topics/src/train-contexts.cc') diff --git a/gi/pyp-topics/src/train-contexts.cc b/gi/pyp-topics/src/train-contexts.cc index c5ab8734..833565cd 100644 --- a/gi/pyp-topics/src/train-contexts.cc +++ b/gi/pyp-topics/src/train-contexts.cc @@ -43,6 +43,7 @@ int main(int argc, char **argv) ("topic-words-out,w", value(), "file to write the topic word distribution to") ("samples,s", value()->default_value(10), "number of sampling passes through the data") ("backoff-type", value(), "backoff type: none|simple") + ("filter-singleton-contexts", "filter singleton contexts") ; store(parse_command_line(argc, argv, cmdline_options), vm); notify(vm); @@ -80,7 +81,7 @@ int main(int argc, char **argv) } ContextsCorpus contexts_corpus; - contexts_corpus.read_contexts(vm["data"].as(), backoff_gen); + contexts_corpus.read_contexts(vm["data"].as(), backoff_gen, vm.count("filter-singleton-contexts")); model.set_backoff(contexts_corpus.backoff_index()); if (backoff_gen) -- cgit v1.2.3