parse an example from various text formats into the protobuf format, e.g. proto/example.proto
| 7 | // parse an example from various text formats into the protobuf format, |
| 8 | // e.g. proto/example.proto |
| 9 | class 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected