diff options
author | Hal Daume III <me@hal3.name> | 2012-06-13 06:29:00 +0400 |
---|---|---|
committer | Hal Daume III <me@hal3.name> | 2012-06-13 06:29:00 +0400 |
commit | 1e706987a29156900d816490493f38b6f9f3c50a (patch) | |
tree | 8a86938bc45269ab50fcd31ccdb6524c1acf57b7 /vowpalwabbit/vw.h | |
parent | ae36b228975e0a34faadc8fd75e3cde5c8f54253 (diff) |
fixed ezexample according to chris suggestions
Diffstat (limited to 'vowpalwabbit/vw.h')
-rw-r--r-- | vowpalwabbit/vw.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vowpalwabbit/vw.h b/vowpalwabbit/vw.h index 7626b336..c966bc96 100644 --- a/vowpalwabbit/vw.h +++ b/vowpalwabbit/vw.h @@ -53,6 +53,14 @@ namespace VW { return all.p->hasher(ss,u) & all.parse_mask; } + inline uint32_t hash_feature_cstr(vw& all, char* fstr, unsigned long u) + { + substring ss; + ss.begin = fstr; + ss.end = ss.begin + strlen(fstr); + return all.p->hasher(ss,u) & all.parse_mask; + } + //after you create and fill feature_spaces, get an example with everything filled in. example* import_example(vw& all, vector< feature_space > ec_info); |