public class InstanceParser
extends java.lang.Object
InstanceParser
This class is a parser for the instances. It reads an instance (a line from the data file) and returns it. It also mantain some information as the relation name.Constructor and Description |
---|
InstanceParser(java.lang.String fileName,
boolean _isTrain)
It does create a new instance of ParserARFF.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method closes the buffered reader used to parse the instances
|
int |
getAttributeNum()
It returns the number of attributes
|
java.lang.String |
getHeader()
It returns all the header read in parseHeader.
|
java.lang.String |
getInstance()
It returns an instance
|
java.lang.String |
getLine()
This method reads one valid line of the file.
|
java.lang.String |
getRelation()
It returns the relation name
|
public InstanceParser(java.lang.String fileName, boolean _isTrain)
fileName
- is the file name of the DB file._isTrain
- is a flag that indicates if the DB is for a train.public java.lang.String getHeader()
public java.lang.String getRelation()
public java.lang.String getInstance()
public int getAttributeNum()
public java.lang.String getLine()
public void close()