MCPcopy Create free account
hub / github.com/dmlc/parameter_server / ExampleParser

Class ExampleParser

src/data/text_parser.h:9–21  ·  view source on GitHub ↗

parse an example from various text formats into the protobuf format, e.g. proto/example.proto

Source from the content-addressed store, hash-verified

7// parse an example from various text formats into the protobuf format,
8// e.g. proto/example.proto
9class ExampleParser {
10 public:
11 typedef DataConfig::TextFormat TextFormat;
12 void init(TextFormat format, bool ignore_fea_slot = false);
13 bool toProto(char*, Example*);
14 private:
15 bool parseLibsvm(char*, Example*);
16 bool parseAdfea(char*, Example*);
17 bool parseTerafea(char*, Example*);
18 bool parsePS(char*, Example*, TextFormat);
19 std::function<bool(char*, Example*)> parser_;
20 bool ignore_fea_slot_;
21};
22
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected