ze-filter  (ze-filter-0.8.0-develop-180218)
ze-lr-funcs.c File Reference
#include <ze-sys.h>
#include <libze.h>
#include <ze-filter.h>
#include <ze-lr-funcs.h>

Go to the source code of this file.

Classes

struct  DATA_T
 
struct  lrtok_T
 
struct  LR_T
 

Macros

#define LR_BODY_LENGTH   256
 
#define LR_RAW_LENGTH   2500
 
#define DATA_INIT   {FALSE, JBT_INITIALIZER}
 
#define LRATE   0.004
 
#define LR_INITIALIZER
 
#define DATE_EXPR
 

Functions

bool lr_data_open (char *fname)
 
bool lr_data_close ()
 
bool lr_data_show_conf ()
 
bool lr_data_dump (char *fname)
 
bool lr_extract (char *id, char *fname, lr_cargs_T *cargs, lr_margs_T *margs)
 
bool lr_classify (char *id, char *fname, lr_cargs_T *cargs, lr_margs_T *margs, test_score_T *mscore)
 
bool lr_learn (char *id, char *fname, lr_cargs_T *cargs, lr_margs_T *margs, test_score_T *mscore, bool spam)
 
bool lr_learn_options (bool active, double margin)
 
bool lr_set_options (lr_opts_T *opts)
 
bool lr_get_options (lr_opts_T *opts)
 
void lr_print_options (lr_opts_T *opts)
 
bool lr_set_learn_callback (lr_callback_F funct)
 

Macro Definition Documentation

◆ DATA_INIT

#define DATA_INIT   {FALSE, JBT_INITIALIZER}

Definition at line 47 of file ze-lr-funcs.c.

◆ DATE_EXPR

#define DATE_EXPR
Value:
"(Sun|Mon|Tue|Wed|Thu|Fri|Sat)?,? +[0-9]+ " \
"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) +20[0-9]{2}" \
" +([0-9]{1,2}:[0-9]{2}:[0-9]{2} +([-+]?[0-9]{2}00)?)?"

Definition at line 552 of file ze-lr-funcs.c.

◆ LR_BODY_LENGTH

#define LR_BODY_LENGTH   256

Definition at line 36 of file ze-lr-funcs.c.

◆ LR_INITIALIZER

#define LR_INITIALIZER
Value:
{ \
FALSE, PTHREAD_MUTEX_INITIALIZER, JBT_INITIALIZER, \
NULL, \
0, 0, 0, 0, \
#define LR_OPTS_INITIALIZER
Definition: ze-lr-funcs.h:74
#define JBT_INITIALIZER
Definition: zeBTree.h:85

Definition at line 110 of file ze-lr-funcs.c.

◆ LR_RAW_LENGTH

#define LR_RAW_LENGTH   2500

Definition at line 37 of file ze-lr-funcs.c.

◆ LRATE

#define LRATE   0.004

Definition at line 85 of file ze-lr-funcs.c.

Function Documentation

◆ lr_data_show_conf()

bool lr_data_show_conf ( )

Definition at line 372 of file ze-lr-funcs.c.