|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsem.graphvis.GraphVisualiser
public class GraphVisualiser
An application for visualising the graphs. Take a look at sem.examples.VisualiseGraphs for sample code on how to run it.
Navigate through sentences using Z and X, iterate over alternative parses (if available) using A and S.
An experimental feature for editing the graphs is also included (has to be enabled when initialising the visualiser).
The following commands are supported:
next / n
- next sentence
prev / p
- previous sentence
goto <i>
- jump to <i>th sentence (e.g., goto 100)
add <t> <i> <j>
- add an edge labeled <t> from the <i>th node to the <j>th node
del <i> <j>
- delete the edge from the <i>th node to the <j>th node
save <file>
- save the graph in TSV format into <file>
Field Summary | |
---|---|
javax.swing.JTextField |
commandArea
|
Constructor Summary | |
---|---|
GraphVisualiser(boolean enableEditing)
Constructor. |
Method Summary | |
---|---|
void |
displayGraph(Graph graph)
Display a single graph. |
void |
displayGraphs(java.util.ArrayList<Graph> graphs)
Display a list of graphs. |
void |
displaySentences(java.util.ArrayList<java.util.ArrayList<Graph>> sentences)
Display a list of sentences (a list of lists of graphs). |
Graph |
getCurrentGraph()
Get the currently active graph. |
static void |
main(java.lang.String[] args)
This is a redundant function. |
void |
nextGraph()
Show the next graph. |
void |
nextSentence()
Show the next sentence. |
void |
prevGraph()
Show the previous graph. |
void |
prevSentence()
Show the previous sentence. |
void |
resetGraph()
Reset and redraw the graph. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public javax.swing.JTextField commandArea
Constructor Detail |
---|
public GraphVisualiser(boolean enableEditing)
enableEditing
- Set to true if you want to enable graph editing.Method Detail |
---|
public void nextSentence()
public void prevSentence()
public void nextGraph()
public void prevGraph()
public Graph getCurrentGraph()
public void resetGraph()
public void displayGraph(Graph graph)
graph
- public void displayGraphs(java.util.ArrayList<Graph> graphs)
graphs
- public void displaySentences(java.util.ArrayList<java.util.ArrayList<Graph>> sentences)
sentences
- public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |