Package jazzparser :: Package parsers :: Package cky :: Module chart
[hide private]
[frames] | no frames]

Module chart

source code

Chart representation for CKY chart parsing.

Classes and utility methods for CKY chart parsing for the Jazz Parser. This provides most of the main functionality of the CKY parser, apart from the main parse loop and the tagger interface.


Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>

Classes [hide private]
  SignHashSet
Based on the basic hash set implementation.
  Chart
Represents a chart for use in CKY chart parsing.
  ChartError
Raised if something goes wrong while building or processing a chart.
Functions [hide private]
 
list_union(main_list, new_entries, derivations=False)
Adds all the entries in the list new_entries to the list main_list, checking first that each entry does not already exist in main_list and only adding it if it doesn't.
source code
 
dump_chart(chart, filename)
Dump a pickled representation of the chart to a file.
source code
Chart
load_chart(filename)
Read in a chart file that was dumped using dump_chart.
source code
Variables [hide private]
  logger = logging.getLogger("main_logger")
  __package__ = 'jazzparser.parsers.cky'
Function Details [hide private]

list_union(main_list, new_entries, derivations=False)

source code 

Adds all the entries in the list new_entries to the list main_list, checking first that each entry does not already exist in main_list and only adding it if it doesn't.

Returns:
True if members were added to the main list, False if main_list is unchanged.

load_chart(filename)

source code 

Read in a chart file that was dumped using dump_chart.

Returns: Chart
the chart instance