|
Medial Code Documentation
|
Text parser that parses the input lines and returns rows in input data. More...
#include <text_parser.h>
Public Member Functions | |
| TextParserBase (InputSplit *source, int nthread) | |
| virtual void | BeforeFirst (void) |
| set before first of the item | |
| virtual size_t | BytesRead (void) const |
| virtual bool | ParseNext (std::vector< RowBlockContainer< IndexType, DType > > *data) |
| read in next several blocks of data | |
Public Member Functions inherited from dmlc::data::ParserImpl< IndexType, DType > | |
| virtual bool | Next (void) |
| implement next | |
| virtual const RowBlock< IndexType, DType > & | Value (void) const |
| get current data | |
Public Member Functions inherited from dmlc::Parser< IndexType, DType > | |
| Parser< uint32_t, real_t > * | Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type) |
| Parser< uint64_t, real_t > * | Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type) |
| Parser< uint32_t, int32_t > * | Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type) |
| Parser< uint64_t, int32_t > * | Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type) |
| Parser< uint32_t, int64_t > * | Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type) |
| Parser< uint64_t, int64_t > * | Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type) |
Public Member Functions inherited from dmlc::DataIter< DType > | |
| virtual | ~DataIter (void) DMLC_THROW_EXCEPTION |
| destructor | |
Protected Member Functions | |
| virtual void | ParseBlock (const char *begin, const char *end, RowBlockContainer< IndexType, DType > *out)=0 |
| parse data into out | |
| bool | FillData (std::vector< RowBlockContainer< IndexType, DType > > *data) |
| read in next several blocks of data | |
Static Protected Member Functions | |
| static const char * | BackFindEndLine (const char *bptr, const char *begin) |
| start from bptr, go backward and find first endof line | |
| static void | IgnoreUTF8BOM (const char **begin, const char **end) |
| Ignore UTF-8 BOM if present. | |
Additional Inherited Members | |
Public Types inherited from dmlc::Parser< IndexType, DType > | |
| typedef Parser< IndexType, DType > *(* | Factory) (const std::string &path, const std::map< std::string, std::string > &args, unsigned part_index, unsigned num_parts) |
| Factory type of the parser. | |
Static Public Member Functions inherited from dmlc::Parser< IndexType, DType > | |
| static Parser< IndexType, DType > * | Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type) |
| create a new instance of parser based on the "type" | |
Protected Attributes inherited from dmlc::data::ParserImpl< IndexType, DType > | |
| IndexType | data_ptr_ |
| pointer to begin and end of data | |
| IndexType | data_end_ |
| std::vector< RowBlockContainer< IndexType, DType > > | data_ |
| internal data | |
| RowBlock< IndexType, DType > | block_ |
| internal row block | |
Text parser that parses the input lines and returns rows in input data.
|
inlinestaticprotected |
start from bptr, go backward and find first endof line
| bptr | end position to go backward |
| begin | the beginning position of buffer |
|
inlinevirtual |
set before first of the item
Implements dmlc::DataIter< DType >.
|
inlinevirtual |
Implements dmlc::data::ParserImpl< IndexType, DType >.
|
inlineprotected |
read in next several blocks of data
| data | vector of data to be returned |
|
inlinestaticprotected |
Ignore UTF-8 BOM if present.
| begin | reference to begin pointer |
| end | reference to end pointer |
|
protectedpure virtual |
parse data into out
| begin | beginning of buffer |
| end | end of buffer |
Implemented in dmlc::data::CSVParser< IndexType, DType >, dmlc::data::LibFMParser< IndexType, DType >, dmlc::data::LibSVMParser< IndexType, DType >, dmlc::data::CSVParser< IndexType, real_t >, dmlc::data::LibFMParser< IndexType, real_t >, and dmlc::data::LibSVMParser< IndexType, real_t >.
|
inlinevirtual |
read in next several blocks of data
| data | vector of data to be returned |
Implements dmlc::data::ParserImpl< IndexType, DType >.