Package nltk_lite :: Package contrib :: Package mit :: Package six863 :: Package parse :: Module featurechart
[hide private]
[frames] | no frames]

Module featurechart

source code

Extension of chart parsing implementation to handle grammars with feature structures as nodes.

Classes [hide private]
  FeatureTreeEdge
FIXME: out of date documentation
  FeatureFundamentalRule
  SingleEdgeFeatureFundamentalRule
  FeatureTopDownExpandRule
The @TopDownExpandRule specialised for feature-based grammars.
  FeatureEarleyChartParse
A chart parser implementing the Earley parsing algorithm, allowing nonterminals that have features (known as Categories).
Functions [hide private]
 
load_earley(filename, trace=1)
Load a grammar from a file, and build an Earley feature parser based on that grammar.
source code
 
demo() source code
 
run_profile() source code
Function Details [hide private]

load_earley(filename, trace=1)

source code 

Load a grammar from a file, and build an Earley feature parser based on
that grammar.

You can optionally specify a tracing level, for how much output you
want to see:

0: No output.
1: Show edges from scanner and completer rules (not predictor).
2 (default): Show all edges as they are added to the chart.
3: Show all edges, plus the results of successful unifications.
4: Show all edges, plus the results of all attempted unifications.
5: Show all edges, plus the results of all attempted unifications,
   including those with cached results.