natural language toolkit graphical representations package c 20012023 nltk project edward loper edlopergmail com steven bird stevenbird1gmail com url https www nltk org for license information see license txt import tkinterbased modules if tkinter is installed natural language toolkit graphical representations package c 2001 2023 nltk project edward loper edloper gmail com steven bird stevenbird1 gmail com url https www nltk org for license information see license txt import tkinter based modules if tkinter is installed
try:
    import tkinter
except ImportError:
    import warnings

    warnings.warn("nltk.draw package not loaded (please install Tkinter library).")
else:
    from nltk.draw.cfg import ProductionList, CFGEditor, CFGDemo
    from nltk.draw.tree import (
        TreeSegmentWidget,
        tree_to_treesegment,
        TreeWidget,
        TreeView,
        draw_trees,
    )
    from nltk.draw.table import Table

from nltk.draw.dispersion import dispersion_plot