JSMILE Learning: TextParser
From DSL
This is a utility class that implements a simple parser for text files.
[edit] Methods
- boolean getPreprocessFileEnabled()
void setPreprocessFileEnabled(boolean value)
When set to true, the parser produces a text file with parsed information. The file carries the name of original data file and the extension .glw (default = false).
- boolean getTypesSpecified()
void setTypesSpecified(boolean value)
The marker that indicates if in the header of the data types are specified. There are three possible keywords: ordinal, discrete, and continuous. By default, the parser assumes the discrete type (values are treated as labels) (default = false).
- boolean getUseHeader()
void setUseHeader(boolean value)
Defines if the first row in the text file contains the labels of the variables (default = true).
- DataSet getDataSet()
Returns the parsed data set. Note that you have to call parse() prior to calling this method.
- void parse(String filename)
Parses the file specified by filename. This method can throw a FileNotFoundException and a SmileException.
