summaryrefslogtreecommitdiff
path: root/utils/json_feature_map_lexer.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-05-13 16:18:43 -0700
committerChris Dyer <cdyer@cs.cmu.edu>2012-05-13 16:18:43 -0700
commit69b0bf8d618338c82fda17878defff77fb35a69f (patch)
tree3f001b9e6b9a38ec3a3523d2ea2ebd2bef47f260 /utils/json_feature_map_lexer.h
parenta097d3ea4132ba4c39c670185a3f4237d24030f9 (diff)
fast creg training code for univariate linear and logistic regression
Diffstat (limited to 'utils/json_feature_map_lexer.h')
-rw-r--r--utils/json_feature_map_lexer.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/json_feature_map_lexer.h b/utils/json_feature_map_lexer.h
new file mode 100644
index 00000000..3324aa29
--- /dev/null
+++ b/utils/json_feature_map_lexer.h
@@ -0,0 +1,15 @@
+#ifndef _RULE_LEXER_H_
+#define _RULE_LEXER_H_
+
+#include <iostream>
+#include <string>
+
+#include "sparse_vector.h"
+
+struct JSONFeatureMapLexer {
+ typedef void (*FeatureMapCallback)(const std::string& id, const SparseVector<float>& fmap, void* extra);
+ static void ReadRules(std::istream* in, FeatureMapCallback func, void* extra);
+};
+
+#endif
+