class_docstr: A graphical tool for exploring the regular expression based chunk
  parser ``nltk.chunk.RegexpChunkParser``.
  
  See ``HELP`` for instructional text.
class_docstr_tok: ["A","graphical","tool","for","exploring","the","regular","expression","based","chunk","parser","``","nltk.chunk.RegexpChunkParser","``",".","See","``","HELP","``","for","instructional","text","."]
code: def save_history(self, filename=None):
      if not filename:
          ftypes = [
              ("Chunk Gramamr History", ".txt"),
              ("All files", "*"),
          ]
          filename = asksaveasfilename(
              filetypes=ftypes, defaultextension=".txt"
          )
          if not filename:
              return
  
      with open(filename, "w") as outfile:
          outfile.write("# Regexp Chunk Parsing Grammar History\n")
          outfile.write("# Saved %s\n" % time.ctime())
          outfile.write("# Development set: %s\n" % self.devset_name)
          for i, (g, p, r, f) in enumerate(self._history):
              hdr = (
                  "Grammar %d/%d (precision=%.2f%%, recall=%.2f%%, "
                  "fscore=%.2f%%)"
                  % (
                      i + 1,
                      len(self._history),
                      p * 100,
                      r * 100,
                      f * 100,
                  )
              )
              outfile.write("\n%s\n" % hdr)
              outfile.write(
                  "".join("  %s\n" % line for line in g.strip().split())
              )
  
          if not (
              self._history
              and self.normalized_grammar
              == self.normalize_grammar(self._history[-1][0])
          ):
              if self.chunker is None:
                  outfile.write("\nCurrent Grammar (not well-formed)\n")
              else:
                  outfile.write("\nCurrent Grammar (not evaluated)\n")
              outfile.write(
                  "".join(
                      "  %s\n" % line
                      for line in self.grammar.strip().split()
                  )
              )
  
imports: import random
  import re
  import textwrap
  import time
  from tkinter import Button, Canvas, Checkbutton, Frame, IntVar, Label, Menu, Scrollbar, Text, Tk
  from tkinter.filedialog import askopenfilename, asksaveasfilename
  from tkinter.font import Font
  from nltk.chunk import ChunkScore, RegexpChunkParser
  from nltk.chunk.regexp import RegexpChunkRule
  from nltk.corpus import conll2000, treebank_chunk
  from nltk.draw.util import ShowText
  from nltk.tree import Tree
  from nltk.util import in_idle
label_desc: Use image node_id 31 for calling the RegexpChunkApp obj's underlying member method code with example usage: obj.save_history(filename) without return types