| Trees | Indices | Help |
|
|---|
|
|
Semantics module for the music_halfspan formalism.
Lambda calculus semantics for the halfspan formalism. This is the form of the semantics described in our paper appendix and in my 2nd-year review.
Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>
|
|||
| |||
|
|||
|
Semantics hash(x) |
|||
| DummyLogicalForm | |||
|
EnharmonicCoordinate A four-dimensional coordinate. |
|||
|
LexicalCoordinate When a logical form is read in from the lexicon, coordinates must be specified relative to the root of the chord. |
|||
|
GhostCoordinate Wrapper that stores an EnharmonicCoordinate. |
|||
|
List The Path or List data structure. |
|||
|
ListCat Represents the concatenation of multiple Lists. |
|||
|
Coordination Special operator to represent coordination. |
|||
|
Variable Standard variable implementation overridden to add time processing. |
|||
|
LambdaAbstraction Standard abstraction implementation overridden to add time processing. |
|||
|
FunctionApplication Standard application implementation overridden to add time processing. |
|||
|
Predicate Superclass of literal predicates (such as leftonto). |
|||
|
Leftonto A leftonto predicate literal. |
|||
|
Rightonto A rightonto predicate literal, analagous to Leftonto. |
|||
|
Now A special predicate that doesn't change its argument at all, except to set its start time to be no later than the start time associated with the predicate. |
|||
|
PathCoordinate Simple subclass of EnharmonicCoordinate to store points on a path directly. |
|||
|
CoordinateList Just a list of enharmonic coordinates, forming a tonal space path. |
|||
| SemanticsStringBuildError | |||
| SemanticsPostProcessError | |||
| KeyInferenceError | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
FORMALISM_NAME =
|
|||
INTERVAL_TO_NN =
|
|||
__package__ =
|
|||
|
|||
Applies fn to arg by creating a FunctionApplication and returns the result. This is used for formalism-unspecific access to this feature. |
Returns the concatenation of the two lists. Uses existing instances passed in, so make sure they're copies if you don't want your original objects modified. |
Produces a list of (x,y) coordinates in the tonal space, given a List or CoordinateList.
|
Like list_lf_to_coordinates, but produces a list of (function,time) pairs instead of (coordinate,time).
|
Generates a list of (coordinates,time) tuples given a parse result.
|
Generates a list of (function,time) tuples given a parse result.
|
Builds a logical form given a list of states and the chords they were assigned to. Accepts a list of labels,time and return a logical form for the formalism (a Semantics in this case). This uses the special logical form classes CoordinateList and PathCoordinate. |
Builds a Semantics instance from a string representation of the logical form. This is mainly for testing and debugging and shouldn't be used in the wild (in the parser, for example). This is not how we construct logical forms out of the lexicon: they're specified in XML, which is a safer way to build LFs, though more laborious to write. The strings may be constructed as follows. Tonic semantics: "<x,y>". This will build an EnharmonicCoordinate. List: "[ITEM0, ITEM1, ...]". This will build a List. List concatenation: "LIST0+LIST1", that is with infix notation. This will build a ListCat. Variable: "$x0". Begin every variable with a $, as if you're writing PHP or Bash, or something. Use any variable name and, optionally, a number. If no number is given, 0 will be used by default. Predicates - leftonto, rightonto: "leftonto(...)", etc. Builds a FunctionApplication with the predicate as its functor. Now: "now@x(...)". Works like the other predicates, but has the special "@x" value to give it a time. Lambda abstraction: "\$x.EXPR". Use a backslash to represent a lambda. You can have multiple abstracted variables, which will result in multiple nested abstractions. EXPR can be any expression. Function application: "(FUNCTOR ARGUMENT)". Always enclose a function application in brackets, even if you wouldn't write them. Note that the output is not beta-reduced. |
|
|||
INTERVAL_TO_NN
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:55 2012 | http://epydoc.sourceforge.net |