if (tokenizer.sval.equalsIgnoreCase("real") || tokenizer.sval.equalsIgnoreCase("integer") || tokenizer.sval.equalsIgnoreCase("numeric")) { m_Attributes.addElement(new Attribute(attributeName, numAttributes()));
if (tokenizer.sval.equalsIgnoreCase(Attribute.ARFF_ATTRIBUTE_REAL) || tokenizer.sval.equalsIgnoreCase(Attribute.ARFF_ATTRIBUTE_INTEGER) || tokenizer.sval.equalsIgnoreCase(Attribute.ARFF_ATTRIBUTE_NUMERIC)) { m_Attributes.addElement(new Attribute(attributeName, numAttributes()));
  protected void readHeader(StreamTokenizer tokenizer)      throws IOException {        String attributeName;    FastVector attributeValues;    int i;    // Get name of relation.    getFirstToken(tokenizer);    if (tokenizer.ttype == StreamTokenizer.TT_EOF) {      errms(tokenizer,"premature end of file");    }    if (tokenizer.sval.equalsIgnoreCase("@relation")){      getNextToken(tokenizer);      m_RelationName = tokenizer.sval;      getLastToken(tokenizer,false);    } else {      errms(tokenizer,"keyword @relation expected");    }    // Create vectors to hold information temporarily.    m_Attributes = new FastVector();     // Get attribute declarations.    getFirstToken(tokenizer);    if (tokenizer.ttype == StreamTokenizer.TT_EOF) {      errms(tokenizer,"premature end of file");    }    while (tokenizer.sval.equalsIgnoreCase("@attribute")) {      // Get attribute name.      getNextToken(tokenizer);      attributeName = tokenizer.sval;      getNextToken(tokenizer);      // Check if attribute is nominal.      if (tokenizer.ttype == StreamTokenizer.TT_WORD) {	// Attribute is real, integer, or string.	if (tokenizer.sval.equalsIgnoreCase("real") ||	    tokenizer.sval.equalsIgnoreCase("integer") ||	    tokenizer.sval.equalsIgnoreCase("numeric")) {	  m_Attributes.addElement(new Attribute(attributeName,						 numAttributes()));	  readTillEOL(tokenizer);	} else if (tokenizer.sval.equalsIgnoreCase("string")) {	  m_Attributes.	    addElement(new Attribute(attributeName, (FastVector)null,				     numAttributes()));	  readTillEOL(tokenizer);	} else if (tokenizer.sval.equalsIgnoreCase("date")) {          String format = null;          if (tokenizer.nextToken() != StreamTokenizer.TT_EOL) {            if ((tokenizer.ttype != StreamTokenizer.TT_WORD) &&                (tokenizer.ttype != '\'') &&                (tokenizer.ttype != '\"')) {              errms(tokenizer,"not a valid date format");            }            format = tokenizer.sval;            readTillEOL(tokenizer);          } else {            tokenizer.pushBack();          }	  m_Attributes.addElement(new Attribute(attributeName, format,                                                numAttributes()));	} else {	  errms(tokenizer,"no valid attribute type or invalid "+		"enumeration");	}      } else {	// Attribute is nominal.	attributeValues = new FastVector();	tokenizer.pushBack();		// Get values for nominal attribute.	if (tokenizer.nextToken() != '{') {	  errms(tokenizer,"{ expected at beginning of enumeration");	}	while (tokenizer.nextToken() != '}') {	  if (tokenizer.ttype == StreamTokenizer.TT_EOL) {	    errms(tokenizer,"} expected at end of enumeration");	  } else {	    attributeValues.addElement(tokenizer.sval);	  }	}	if (attributeValues.size() == 0) {	  errms(tokenizer,"no nominal values found");	}	m_Attributes.	  addElement(new Attribute(attributeName, attributeValues,				   numAttributes()));      }      getLastToken(tokenizer,false);      getFirstToken(tokenizer);      if (tokenizer.ttype == StreamTokenizer.TT_EOF)	errms(tokenizer,"premature end of file");    }    // Check if data part follows. We can't easily check for EOL.    if (!tokenizer.sval.equalsIgnoreCase("@data")) {      errms(tokenizer,"keyword @data expected");    }        // Check if any attributes have been declared.    if (m_Attributes.size() == 0) {      errms(tokenizer,"no attributes declared");    }    // Allocate buffers in case sparse instances have to be read    m_ValueBuffer = new double[numAttributes()];    m_IndicesBuffer = new int[numAttributes()];  }