LBJ2.nlp
Class ColumnFormat

java.lang.Object
  extended by LBJ2.parse.LineByLine
      extended by LBJ2.nlp.ColumnFormat
All Implemented Interfaces:
Parser

public class ColumnFormat
extends LineByLine

This parser returns arrays of Strings representing the rows of a file in column format. The input file is assumed to contain fields of non-whitespace characters separated by any amount of whitespace, one line of which is usually used to represent a word in a corpus. This parser breaks a given line into one String per field, omitting all of the whitespace. They are then returned in an array via next(). If the input line is empty or contains only whitespace, a zero length array will be returned.


Field Summary
 
Fields inherited from class LBJ2.parse.LineByLine
fileName, in
 
Constructor Summary
ColumnFormat(java.lang.String file)
          Creates the parser.
 
Method Summary
 java.lang.Object next()
          Returns an array of Strings representing the information in the columns of this row.
 
Methods inherited from class LBJ2.parse.LineByLine
readLine, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnFormat

public ColumnFormat(java.lang.String file)
Creates the parser.

Parameters:
file - The name of the file to parse.
Method Detail

next

public java.lang.Object next()
Returns an array of Strings representing the information in the columns of this row.

Returns:
The next object parsed from the input data.