blob: 162b201c89e16dcb4bef48122591e2e7057908ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* Common classifier functions
*/
#include <sys/types.h>
#include "classifiers.h"
struct classifier classifiers[] = {
{
.name = "winnow",
.init_func = winnow_init,
.classify_func = winnow_classify,
.learn_func = winnow_learn,
.result_file_func = winnow_result_file
},
};
struct classifier*
get_classifier (char *name)
{
int i;
for (i = 0; i < sizeof (classifiers) / sizeof (classifiers[0]); i ++) {
if (strcmp (classifiers[i].name, name) == 0) {
return &classifiers[i];
}
}
return NULL;
}
/*
* vi:ts=4
*/
|