Package jazzparser :: Package formalisms :: Class FormalismBase
[hide private]
[frames] | no frames]

Class FormalismBase

source code

object --+
         |
        FormalismBase
Known Subclasses:

Superclass of all Formalism structures. These tie together all the components of a formalism in an easily accessible way: rules, syntax, semantics, etc.

Nested Classes [hide private]
  __metaclass__
  Syntax
Formalisms should define override this nested class with their own, which will specify values for these attributes.
  Semantics
Formalisms should define override this nested class with their own, which will specify values for these attributes.
  Evaluation
Functions for evaluating tonal space paths and parse results.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
process_output_options(cls, optdict)
Makes output options globally available, based on a dictionary.
source code
 
cl_output_options(cls, string)
Convenience method so you don't have to do this lots of times over.
source code
 
sign_to_coordinates(cls, sign)
Function to generate a list of coordinates from a parse result.
source code
 
get_name(cls) source code
Class Variables [hide private]
  literal_functions = {}
  shell_tools = []
  output_options = []
ModuleOptions that can be used to set global settings that will affect the formatting of output.
  semantics_to_coordinates = None
Function to generate a list of coordinates from a parse result (semantic part).
  semantics_distance_metrics = []
List of distance metrics available in the formalism.
  PcfgModel = None
Pcfg model class appropriate for the formalism.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

process_output_options(cls, optdict)
Class Method

source code 

Makes output options globally available, based on a dictionary.

See Also: output_options.

cl_output_options(cls, string)
Class Method

source code 

Convenience method so you don't have to do this lots of times over.

Take a string of output options from the command line and set the output options from it.

Should only be used in command-line scripts.

sign_to_coordinates(cls, sign)
Class Method

source code 

Function to generate a list of coordinates from a parse result. By default, uses semantics_to_coordinates applied to the semantic part of the sign.


Class Variable Details [hide private]

output_options

ModuleOptions that can be used to set global settings that will affect the formatting of output.

Don't use any required options. All options must be able to be initialized to a default.

The values of the options will be set to their default when the formalism class is first encountered. Call process_output_options to customize the options.

Although the options are globally available for simplicity of access, you should only ever access them from within formalism-specific code in practice.

Value:
[]

semantics_distance_metrics

List of distance metrics available in the formalism. Each item is a subclass of jazzparser.formalisms.base.semantics.distance.DistanceMetric.

Value:
[]