module documentation

The lexicon is constructed by calling lexicon.fromstring(<lexicon string>).

In order to construct a parser, you also need a rule set. The standard English rules are provided in chart as chart.DefaultRuleSet.

The parser can then be constructed by calling, for example: parser = chart.CCGChartParser(<lexicon>, <ruleset>)

Parsing is then performed by running parser.parse(<sentence>.split()).

While this returns a list of trees, the default representation of the produced trees is not very enlightening, particularly given that it uses the same tree class as the CFG parsers. It is probably better to call: chart.printCCGDerivation(<parse tree extracted from list>) which should print a nice representation of the derivation.

This entire process is shown far more clearly in the demonstration: python chart.py

Class BackwardTypeRaiseRule Class for applying backward type raising.
Class BinaryCombinatorRule Class implementing application of a binary combinator to a chart. Takes the directed combinator to apply.
Class CCGChart Undocumented
Class CCGChartParser Chart parser for CCGs. Based largely on the ChartParser class from NLTK.
Class CCGEdge Undocumented
Class CCGLeafEdge Class representing leaf edges in a CCG derivation.
Class ForwardTypeRaiseRule Class for applying forward type raising
Function compute_semantics Undocumented
Function demo Undocumented
Function printCCGDerivation Undocumented
Function printCCGTree Undocumented
Variable ApplicationRuleSet Undocumented
Variable CompositionRuleSet Undocumented
Variable DefaultRuleSet Undocumented
Variable lex Undocumented
Variable SubstitutionRuleSet Undocumented
Variable TypeRaiseRuleSet Undocumented
def compute_semantics(children, edge): (source)

Undocumented

def demo(): (source)

Undocumented

def printCCGDerivation(tree): (source)

Undocumented

def printCCGTree(lwidth, tree): (source)

Undocumented

ApplicationRuleSet = (source)

Undocumented

CompositionRuleSet = (source)

Undocumented

DefaultRuleSet = (source)

Undocumented

Undocumented

SubstitutionRuleSet = (source)

Undocumented

TypeRaiseRuleSet = (source)

Undocumented