Package PyML :: Package containers :: Module parsers :: Class Parser
[frames] | no frames]

Class Parser

source code

base.pymlObject.PyMLobject --+
                             |
                            Parser

A parser class to read datasets from a file. Each parser support the following interface: Constructor - pass a file name / file handle and information on which pattern/classes/features to read from the file check - checks whether the file conforms to the format read by the parser scan - scan the file and make the _address variable that lists the positions in the file of all the patterns that need to be read next - read the next pattern (after calling the __iter__ method)
Instance Methods
 
__init__(self, file, **args) source code
 
check(self) source code
 
scan(self) source code
 
__iter__(self) source code
 
__len__(self)
how many patterns are read
source code
 
next(self) source code
 
skipComments(self) source code
Class Variables
  commentChar = ['%', '#']