Class CSVRegexRecordReader
- java.lang.Object
-
- org.datavec.api.records.reader.BaseRecordReader
-
- org.datavec.api.records.reader.impl.LineRecordReader
-
- org.datavec.api.records.reader.impl.csv.CSVRecordReader
-
- org.datavec.api.records.reader.impl.csv.CSVRegexRecordReader
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,Configurable
,RecordReader
public class CSVRegexRecordReader extends CSVRecordReader
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
delimiter
protected Pattern[]
patterns
protected String
quote
protected String[]
regexs
-
Fields inherited from class org.datavec.api.records.reader.impl.csv.CSVRecordReader
DEFAULT_DELIMITER, DEFAULT_QUOTE, DELIMITER, QUOTE, SKIP_NUM_LINES, skipNumLines
-
Fields inherited from class org.datavec.api.records.reader.impl.LineRecordReader
charset, conf, initialized, lineIndex, locations, splitIndex
-
Fields inherited from class org.datavec.api.records.reader.BaseRecordReader
inputSplit, listeners, streamCreatorFn
-
Fields inherited from interface org.datavec.api.records.reader.RecordReader
APPEND_LABEL, LABELS, NAME_SPACE
-
-
Constructor Summary
Constructors Constructor Description CSVRegexRecordReader(int skipNumLines, String delimiter, String quote, String[] regexs)
Skip lines, use delimiter, strip quotes, and parse each column with a regex
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Writable>
parseLine(String line)
-
Methods inherited from class org.datavec.api.records.reader.impl.csv.CSVRecordReader
batchesSupported, hasNext, initialize, loadFromMetaData, loadFromMetaData, next, next, nextRecord, onLocationOpen, readStringLine, record, reset
-
Methods inherited from class org.datavec.api.records.reader.impl.LineRecordReader
close, closeIfRequired, getConf, getIterator, getLabels, initialize, resetSupported, setConf
-
Methods inherited from class org.datavec.api.records.reader.BaseRecordReader
getListeners, invokeListeners, setListeners, setListeners
-
-
-
-
Constructor Detail
-
CSVRegexRecordReader
public CSVRegexRecordReader(int skipNumLines, String delimiter, String quote, String[] regexs)
Skip lines, use delimiter, strip quotes, and parse each column with a regex- Parameters:
skipNumLines
- the number of lines to skipdelimiter
- the delimiterquote
- the quote to stripregexs
- the regexs to parse columns with
-
-
Method Detail
-
parseLine
protected List<Writable> parseLine(String line)
- Overrides:
parseLine
in classCSVRecordReader
-
-