Package nltk_lite :: Package draw :: Module chart
[show private | hide private]
[frames | no frames]

Module nltk_lite.draw.chart

A graphical tool for exploring chart parsing.

Chart parsing is a flexible parsing algorithm that uses a data structure called a "chart" to record hypotheses about syntactic constituents. Each hypothesis is represented by a single "edge" on the chart. A set of "chart rules" determine when new edges can be added to the chart. This set of rules controls the overall behavior of the parser (e.g., whether it parses top-down or bottom-up).

The chart parsing tool demonstrates the process of parsing a single sentence, with a given grammar and lexicon. Its display is divided into three sections: the bottom section displays the chart; the middle section displays the sentence; and the top section displays the partial syntax tree corresponding to the selected edge. Buttons along the bottom of the window are used to control the execution of the algorithm.

The chart parsing tool allows for flexible control of the parsing algorithm. At each step of the algorithm, you can select which rule or strategy you wish to apply. This allows you to experiment with mixing different strategies (e.g., top-down and bottom-up). You can exercise fine-grained control over the algorithm by selecting which edge you wish to apply a rule to.
Classes
BottomUpEdgeRule  
BottomUpInitEdgeRule  
ChartComparer  
ChartDemo  
ChartMatrixView A view of a chart that displays the contents of the corresponding matrix.
ChartResultsView  
ChartView A component for viewing charts.
EdgeList  
EdgeRule To create an edge rule, make an empty base class that uses EdgeRule as the first base class, and the basic rule as the second base class.
FundamentalEdgeRule  
PseudoEarleyEdgeRule  
PseudoEarleyInitRule  
PseudoEarleyRule  
TopDownExpandEdgeRule  
TopDownMatchEdgeRule  

Function Summary
  demo()

Generated by Epydoc 2.1 on Tue Sep 5 09:37:21 2006 http://epydoc.sf.net