Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@hunch.net>2012-01-10 07:24:39 +0400
committerJohn Langford <jl@hunch.net>2012-01-10 07:24:39 +0400
commit1a48f9e976a3b00c99cfacabf3332f9907f319c2 (patch)
tree0c13d2728ddd86e10983b4b13bd5cd992345938e /vowpalwabbit/parse_primitives.h
parent9e2f0e9b2b44c2bc68aece126c4bf18ed90bd1d7 (diff)
Reduction interface developing, OneAgainstAll now in
Diffstat (limited to 'vowpalwabbit/parse_primitives.h')
-rw-r--r--vowpalwabbit/parse_primitives.h14
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);