Module inspector
source code
Chart inspector, for viewing the chart during parsing.
A graphical interface to observe the state of a chart during parsing.
A chart inspector runs alongside the parser in a separate thread and
updates its representation of the chart from the actual one being
manipulated by the parser whenever the user asks for an update.
The inspector shows the number of signs in each cell of the chart and
allows inspection of what those signs are and even the derivation trace
(if available) for each one.
Note that this module uses PyGtk, which is not required for most of
the project. You should not import anything from this module at the top
level, but only when you need it. That way, if PyGtk is not installed, an
error will only occur when you try to use it.
You can also read a pickled chart in from a file and use the chart
inspector to examine it.
Author:
Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>
|
|
LAST_UPDATE_COLOR = '#f0d0d0'
|
|
|
__package__ = 'jazzparser.parsers.cky'
|
inspect_chart_file(filename,
inspector_cls=None)
| source code
|
Load a pickled chart from a file and display the chart inspector to
examine it.
- Parameters:
filename (string) - the filename of the file to load
inspector_cls (class) - the class of the inspector window to load the chart in. By
default, uses the CKY inspector, but you may want to use
subclasses.
|