Package org.apache.lucene.tests.analysis
Class TokenStreamToDot
- java.lang.Object
-
- org.apache.lucene.tests.analysis.TokenStreamToDot
-
public class TokenStreamToDot extends Object
Consumes a TokenStream and outputs the dot (graphviz) string (graph).
-
-
Field Summary
Fields Modifier and Type Field Description protected PrintWriterout
-
Constructor Summary
Constructors Constructor Description TokenStreamToDot(String inputText, TokenStream in, PrintWriter out)If inputText is non-null, and the TokenStream has offsets, we include the surface form in each arc's label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtoDot()protected voidwriteArc(int fromNode, int toNode, String label, String style)protected voidwriteHeader()Override to customize.protected voidwriteNode(int name, String label)protected voidwriteTrailer()Override to customize.
-
-
-
Field Detail
-
out
protected final PrintWriter out
-
-
Constructor Detail
-
TokenStreamToDot
public TokenStreamToDot(String inputText, TokenStream in, PrintWriter out)
If inputText is non-null, and the TokenStream has offsets, we include the surface form in each arc's label.
-
-
Method Detail
-
toDot
public void toDot() throws IOException- Throws:
IOException
-
writeNode
protected void writeNode(int name, String label)
-
writeHeader
protected void writeHeader()
Override to customize.
-
writeTrailer
protected void writeTrailer()
Override to customize.
-
-