Package nltk :: Package parse :: Module earleychart :: Class FeatureEarleyChartParser
[hide private]
[frames] | no frames]

type FeatureEarleyChartParser

source code

             object --+                
            api.ParserI --+            
          chart.ChartParser --+        
         IncrementalChartParser --+    
             object --+           |    
                      |           |    
            api.ParserI --+       |    
                          |       |    
          chart.ChartParser --+   |    
                              |   |    
featurechart.FeatureChartParser --+    
      FeatureIncrementalChartParser --+

Instance Methods [hide private]
__init__(self, grammar, **parser_args)
Create a new Earley chart parser, that uses grammar to parse texts.
source code

Inherited from IncrementalChartParser: chart_parse

Inherited from chart.ChartParser: grammar, nbest_parse

Inherited from chart.ChartParser (private): _trace_new_edges

Inherited from api.ParserI: batch_iter_parse, batch_nbest_parse, batch_parse, batch_prob_parse, iter_parse, parse, prob_parse


Inherited from api.ParserI: batch_test, get_parse, get_parse_dict, get_parse_list, get_parse_prob

Method Details [hide private]

__init__(self, grammar, **parser_args)

source code 

Create a new Earley chart parser, that uses grammar to parse texts.

  • grammar - The grammar used to parse texts.
  • 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.
  • trace_chart_width - The default total width reserved for the chart in trace output. The remainder of each line will be used to display edges.
  • chart_class - The class that should be used to create the charts used by this parser.
Overrides: chart.ChartParser.__init__
(inherited documentation)