|
||||||||||
| 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.GraphvizWalker
public class GraphvizWalker
Walks through a treebank, reads it in, and outputs representations of the trees in Graphviz format. Alternatively, selects a given sentence (identified by its location) in the treebank and outputs a Graphviz representation for that sentence.
Usage: java edu.upenn.cis.spinal.GraphvizWalker <infile> [<sentence_location>] Output will be placed in files named <sentence_location>.dot. If <sentence_location> is not given, then all the sentences in the file will be processed and placed into a separate file each.
| Field Summary |
|---|
| Fields inherited from class edu.upenn.cis.spinal.AbstractWalker |
|---|
args, terminate |
| Constructor Summary | |
|---|---|
GraphvizWalker()
Creates a new instance of GraphvizWalker. |
|
| 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()
Prints out the following message: |
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 GraphvizWalker()
GraphvizWalker.
| 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()
Usage: java edu.upenn.cis.spinal.GraphvizWalker <infile> [<sentence_location>] Output will be placed in files named <sentence_location>.dot. If <sentence_location> is not given, then all the sentences in the file will be processed and placed into a separate file each.
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 | |||||||||