diff options
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/controller.c b/src/controller.c index fa2fa268f..4369f7d7f 100644 --- a/src/controller.c +++ b/src/controller.c @@ -235,8 +235,8 @@ process_command (struct controller_command *cmd, char **cmd_args, struct control session->learn_rcpt = NULL; session->learn_from = NULL; session->learn_filename = NULL; - session->learn_tokenizer = get_tokenizer ("osb-text"); - session->learn_classifier = get_classifier ("winnow"); + session->learn_tokenizer = statfile->tokenizer; + session->learn_classifier = statfile->classifier; /* By default learn positive */ session->in_class = 1; /* Get all arguments */ @@ -262,22 +262,6 @@ process_command (struct controller_command *cmd, char **cmd_args, struct control } session->learn_from = memory_pool_strdup (session->session_pool, arg); break; - case 't': - arg = *(cmd_args + 1); - if (!arg || *arg == '\0' || (session->learn_tokenizer = get_tokenizer (arg)) == NULL) { - r = snprintf (out_buf, sizeof (out_buf), "tokenizer is not defined" CRLF, arg); - bufferevent_write (session->bev, out_buf, r); - return; - } - break; - case 'c': - arg = *(cmd_args + 1); - if (!arg || *arg == '\0' || (session->learn_classifier = get_classifier (arg)) == NULL) { - r = snprintf (out_buf, sizeof (out_buf), "classifier is not defined" CRLF, arg); - bufferevent_write (session->bev, out_buf, r); - return; - } - break; case 'n': session->in_class = 0; break; |