Package nltk_lite :: Package parse :: Module chart :: Class ChartParse
[show private | hide private]
[frames | no frames]

Type ChartParse

object --+        
         |        
    ParseI --+    
             |    
 AbstractParse --+
                 |
                ChartParse

Known Subclasses:
SteppingChartParse

A generic chart parser. A strategy, or list of ChartRules, is used to decide what edges to add to the chart. In particular, ChartParse uses the following algorithm to parse texts:
Method Summary
  __init__(self, grammar, strategy, trace)
Create a new chart parser, that uses grammar to parse texts.
  get_parse_list(self, tokens, tree_class)
Inherited from AbstractParse: get_parse, grammar, parse
Inherited from ParseI: get_parse_probs
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Method Details

__init__(self, grammar, strategy, trace=0)
(Constructor)

Create a new chart parser, that uses grammar to parse texts.
Parameters:
grammar - The grammar used to parse texts.
           (type=cfg.Grammar)
strategy - A list of rules that should be used to decide what edges to add to the chart.
           (type=list of ChartRuleI)
trace - The level of tracing that should be used when parsing a text. 0 will generate no tracing output; and higher numbers will produce more verbose tracing output.
           (type=int)
Overrides:
nltk_lite.parse.AbstractParse.__init__

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