Package jazzparser :: Module parse
[hide private]
[frames] | no frames]

Module parse

source code

Main command-line interface to the Jazz Parser.

Takes input from the command line or a file and parses it. Allows specification of formalism, parser and tagger modules. See usage info for more details.


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

Functions [hide private]
 
main() source code
 
do_parse(grammar, tagger_cls, parser_cls, input, topts, popts, backoff, npopts, options, identifier, multiprocessing=False, logfile=None, partition=None)
Function called for each input to do tagging and parsing and return the results.
source code
 
list_results(results)
Prints out a list of the results in the given results list.
source code
 
remove_complex_categories(result_list, formalism) source code
Variables [hide private]
  logger = logging.getLogger("main_logger")
  __package__ = 'jazzparser'
Function Details [hide private]

do_parse(grammar, tagger_cls, parser_cls, input, topts, popts, backoff, npopts, options, identifier, multiprocessing=False, logfile=None, partition=None)

source code 

Function called for each input to do tagging and parsing and return the results. It's a separate function so that we can hand it over to worker processes to do multiprocessing.

Parameters:
  • logfile (str) - filename to send logging output to. If None, will log to stderr

list_results(results)

source code 

Prints out a list of the results in the given results list. This is used after parsing and during interactive results viewing.