proper.imp
Interface ParserInterface

All Known Implementing Classes:
CSVParser, Parser, PrologParser

public interface ParserInterface

This interface is common to all parsers, handwritten and JLex/CUP-generated.

Version:
$Revision: 1.2 $
Author:
FracPete

Field Summary
static java.lang.String CLASS_NEGATIVE
          the class for negative examples
static java.lang.String CLASS_POSITIVE
          the class for positive examples
 
Method Summary
 void clear()
          clears any previous results
 boolean getAddClassLabel()
          returns the flag, whether to add the class label or not
 java.lang.String getClassLabel()
          returns the class label
 java.lang.String getFilename()
          returns the current filename
 boolean getOnlyForSingles()
          returns the flag, whether the class label is added only to predicates with one argument
 java.util.Vector getPredicates()
          returns the predicates that were parsed from the file
 boolean getVerbose()
          returns the verbose flag
 void parse(java.io.Reader reader)
          parses the given reader
 void parse(java.lang.String filename)
          parses the given file
 void setAddClassLabel(boolean addClassLabel)
          sets the flag, whether to add the class label or not
 void setClassLabel(java.lang.String classLabel)
           
 void setFilename(java.lang.String filename)
          sets the name of the file being parsed right now
 void setID(ID id)
          sets the ID generator
 void setOnlyForSingles(boolean onlyForSingles)
          sets the flag, whether the class label is added only to predicates with one argument
 void setVerbose(boolean verbose)
          sets the verbose flag, whether to output more information or not
 

Field Detail

CLASS_POSITIVE

static final java.lang.String CLASS_POSITIVE
the class for positive examples

See Also:
Constant Field Values

CLASS_NEGATIVE

static final java.lang.String CLASS_NEGATIVE
the class for negative examples

See Also:
Constant Field Values
Method Detail

clear

void clear()
clears any previous results


setVerbose

void setVerbose(boolean verbose)
sets the verbose flag, whether to output more information or not


getVerbose

boolean getVerbose()
returns the verbose flag


setAddClassLabel

void setAddClassLabel(boolean addClassLabel)
sets the flag, whether to add the class label or not


getAddClassLabel

boolean getAddClassLabel()
returns the flag, whether to add the class label or not


setOnlyForSingles

void setOnlyForSingles(boolean onlyForSingles)
sets the flag, whether the class label is added only to predicates with one argument


getOnlyForSingles

boolean getOnlyForSingles()
returns the flag, whether the class label is added only to predicates with one argument


setClassLabel

void setClassLabel(java.lang.String classLabel)
See Also:
setOnlyForSingles(boolean)

getClassLabel

java.lang.String getClassLabel()
returns the class label


setID

void setID(ID id)
sets the ID generator


setFilename

void setFilename(java.lang.String filename)
sets the name of the file being parsed right now


getFilename

java.lang.String getFilename()
returns the current filename


parse

void parse(java.lang.String filename)
           throws java.lang.Exception
parses the given file

Throws:
java.lang.Exception

parse

void parse(java.io.Reader reader)
           throws java.lang.Exception
parses the given reader

Throws:
java.lang.Exception

getPredicates

java.util.Vector getPredicates()
returns the predicates that were parsed from the file