Package jazzparser :: Package formalisms :: Package music_halfspan :: Class Formalism :: Class Syntax
[hide private]
[frames] | no frames]

Class Syntax

source code

FormalismBase.Syntax --+
                       |
                      Formalism.Syntax

Formalisms should define override this nested class with their own, which will specify values for these attributes.

Nested Classes [hide private]
  Sign
A CCG category and its associated semantics: a CCG sign.
  ComplexCategory
In the halfspan formalism, complex categories are made up of an argument half category, a slash and a result half category.
  AtomicCategory
An atomic category is of the form A-B, where A and B are half categories.
  Slash
  DummyCategory
hash(x)
Class Methods [hide private]
 
is_complex_category(cls, obj)
For the sake of efficiency, override this and don't use isinstance.
source code
 
is_atomic_category(cls, obj)
For the sake of efficiency, override this and don't use isinstance.
source code

Inherited from FormalismBase.Syntax: is_category

Static Methods [hide private]
 
merge_equal_signs(existing_sign, new_sign)
Used when adding equal signs to the same edge in the chart.
source code
 
pre_generalize_category(category)
When abstracting categories to something general that just represents the structure of the category, we have to do something special with half categories, since the standard abstraction routine expects the children of a complex category to be atomic or complex categories themselves.
source code
Method Details [hide private]

merge_equal_signs(existing_sign, new_sign)
Static Method

source code 

Used when adding equal signs to the same edge in the chart. Currently does nothing.

Overrides: FormalismBase.Syntax.merge_equal_signs

pre_generalize_category(category)
Static Method

source code 

When abstracting categories to something general that just represents the structure of the category, we have to do something special with half categories, since the standard abstraction routine expects the children of a complex category to be atomic or complex categories themselves.

is_complex_category(cls, obj)
Class Method

source code 

For the sake of efficiency, override this and don't use isinstance. This gets called a LOT of times!

Overrides: FormalismBase.Syntax.is_complex_category

is_atomic_category(cls, obj)
Class Method

source code 

For the sake of efficiency, override this and don't use isinstance. This gets called a LOT of times!

This works because the category classes in this formalism all define ATOMIC, so we don't need to check the type.

Overrides: FormalismBase.Syntax.is_atomic_category