public class LinguistDumper extends LinguistProcessor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_FILENAME
The property for the destination of the LinguistDumper
|
PROP_LINGUIST
Constructor and Description |
---|
LinguistDumper() |
LinguistDumper(java.lang.String filename,
Linguist linguist) |
Modifier and Type | Method and Description |
---|---|
protected void |
dumpArc(java.io.PrintStream out,
SearchState from,
SearchStateArc arc,
int level)
Dumps an arc
|
protected void |
endDump(java.io.PrintStream out)
Called at the end of the dump
|
protected void |
endDumpNode(java.io.PrintStream out,
SearchState state,
int level)
Called to dump out a node in the search space
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
void |
run()
Dumps the search space hmm in GDL format
|
protected void |
setDepthFirst(boolean depthFirst)
Sets whether the traversal is depth first or breadth first
|
protected void |
startDump(java.io.PrintStream out)
Called at the start of the dump
|
protected void |
startDumpNode(java.io.PrintStream out,
SearchState state,
int level)
Called to dump out a node in the search space
|
getLinguist, getName
@S4String(defaultValue="linguistDump.txt") public static final java.lang.String PROP_FILENAME
public LinguistDumper(java.lang.String filename, Linguist linguist)
public LinguistDumper()
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class LinguistProcessor
ps
- a property sheet holding the new dataPropertyException
- if there is a problem with the properties.public void run()
run
in interface java.lang.Runnable
run
in class LinguistProcessor
protected void setDepthFirst(boolean depthFirst)
depthFirst
- if true traversal is depth first, otherwise the traversal is breadth firstprotected void startDump(java.io.PrintStream out)
out
- the output stream.protected void endDump(java.io.PrintStream out)
out
- the output stream.protected void startDumpNode(java.io.PrintStream out, SearchState state, int level)
out
- the output stream.state
- the state to dumplevel
- the level of the stateprotected void endDumpNode(java.io.PrintStream out, SearchState state, int level)
out
- the output stream.state
- the state to dumplevel
- the level of the stateprotected void dumpArc(java.io.PrintStream out, SearchState from, SearchStateArc arc, int level)
out
- the output stream.from
- arc leaves this statearc
- the arc to dumplevel
- the level of the state