org.apache.lucene.analysis

## Class TokenStreamToDot

- java.lang.Object
- - org.apache.lucene.analysis.TokenStreamToDot

-     public class TokenStreamToDot
      extends Object

  Consumes a TokenStream and outputs the dot (graphviz) string (graph).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected PrintWriter` | `out`

  - ### Constructor Summary

    Constructors
    Constructor and 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 and Description
    --- | ---
    `void` | `toDot()`
    `protected void` | `writeArc(int fromNode, int toNode, String label, String style)`
    `protected void` | `writeHeader()` Override to customize.
    `protected void` | `writeNode(int name, String label)`
    `protected void` | `writeTrailer()` Override to customize.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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`

    - #### writeArc

          protected void writeArc(int fromNode,
                                  int toNode,
                                  String label,
                                  String style)

    - #### writeNode

          protected void writeNode(int name,
                                   String label)

    - #### writeHeader

          protected void writeHeader()

      Override to customize.

    - #### writeTrailer

          protected void writeTrailer()

      Override to customize.

Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.