ModErn Text Analysis
META Enumerates Textual Applications
|
Parser specifically for libsvm-formatted files. More...
Classes | |
class | libsvm_parser_exception |
Exception class for this parser. More... | |
Typedefs | |
using | counts_t = const std::vector< std::pair< term_id, double >> |
Collection of (term_id, double) | |
Functions | |
class_label | label (const std::string &text) |
Extracts a class_label from a string in libsvm format. More... | |
counts_t | counts (const std::string &text, bool contains_label=true) |
Parser specifically for libsvm-formatted files.
class_label meta::io::libsvm_parser::label | ( | const std::string & | text | ) |
Extracts a class_label from a string in libsvm format.
text | A libsvm-formatted string; throws an exception if it can't be parsed correctly |
counts_t meta::io::libsvm_parser::counts | ( | const std::string & | text, |
bool | contains_label = true |
||
) |
text | A libsvm-formatted string; throws an exception if it can't be parsed correctly |
contains_label | Whether this string's first token is the class_label |