diff options
author | John Langford <jl@hunch.net> | 2012-01-10 07:24:39 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2012-01-10 07:24:39 +0400 |
commit | 1a48f9e976a3b00c99cfacabf3332f9907f319c2 (patch) | |
tree | 0c13d2728ddd86e10983b4b13bd5cd992345938e /vowpalwabbit/parse_primitives.h | |
parent | 9e2f0e9b2b44c2bc68aece126c4bf18ed90bd1d7 (diff) |
Reduction interface developing, OneAgainstAll now in
Diffstat (limited to 'vowpalwabbit/parse_primitives.h')
-rw-r--r-- | vowpalwabbit/parse_primitives.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vowpalwabbit/parse_primitives.h b/vowpalwabbit/parse_primitives.h index 623a9e63..8ce6f335 100644 --- a/vowpalwabbit/parse_primitives.h +++ b/vowpalwabbit/parse_primitives.h @@ -7,14 +7,26 @@ embodied in the content of this file are licensed under the BSD #ifndef PP #define PP -#include "v_array.h" #include<iostream> +#include "v_array.h" +#include "io.h" struct substring { char *begin; char *end; }; +struct label_parser { + void (*default_label)(void*); + void (*parse_label)(void*, v_array<substring>&); + void (*cache_label)(void*, io_buf& cache); + size_t (*read_cached_label)(void*, io_buf& cache); + void (*delete_label)(void*); + float (*get_weight)(void*); + float (*get_initial)(void*); + size_t label_size; +}; + //chop up the string into a v_array of substring. void tokenize(char delim, substring s, v_array<substring> &ret); |