|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.upenn.cis.spinal.AbstractWalker
edu.upenn.cis.spinal.EchoWalker
public class EchoWalker
Walks through a treebank, reads it in, and prints it to stdout
unchanged. This class is provided as a simple example of an implementation
of AbstractWalker. It can be used for debugging purposes when testing
the toString() methods. This class can also print
to file if that file is given as a second argument.
| Field Summary |
|---|
| Fields inherited from class edu.upenn.cis.spinal.AbstractWalker |
|---|
args, terminate |
| Constructor Summary | |
|---|---|
EchoWalker()
Creates a new instance of EchoWalker. |
|
| Method Summary | |
|---|---|
void |
forEachSentence(Sentence s)
Implementations of this method should specify what the class should do on reading in a sentence (a derivation tree) from the file. |
protected void |
init()
Implementations of this method should specify what (if anything) the class should do before attempting to read in a file. |
static void |
main(String[] argv)
Main method, call from command line. |
protected void |
printUsage()
Implementations of this method should print out a short string to stdout
describing the function of the class. |
protected void |
wrapUp()
Implementations of this method should specify what (if anything) the class should do upon reading all sentences from the file. |
| Methods inherited from class edu.upenn.cis.spinal.AbstractWalker |
|---|
getArgs, process, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EchoWalker()
EchoWalker.
| Method Detail |
|---|
protected void init()
AbstractWalker
init in class AbstractWalkerpublic void forEachSentence(Sentence s)
AbstractWalker
forEachSentence in class AbstractWalkers - the current Sentence objectprotected void wrapUp()
AbstractWalkerAbstractWalker.process(String[]) method also calls this if AbstractWalker.terminate()
has been invoked.
wrapUp in class AbstractWalkerprotected void printUsage()
AbstractWalkerstdout
describing the function of the class. This method is automatically
called by AbstractWalker.process(String[]) when no command-line
argument is passed.
printUsage in class AbstractWalkerpublic static void main(String[] argv)
argv - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||