concepts.language.ccg.composition.CCGComposable#
- class CCGComposable[source]#
Bases:
object
The basic class for composable elements (including syntax and semantics) for CCG.
Methods
bapp
(lhs)Backward application composition.
compose
(rhs, composition_type)Compose this element with another element.
coord
(other)Coordination composition.
coord3
(lhs, rhs)Coordination composition with three elements.
fapp
(rhs)Forward application composition.
none
(rhs)None composition (composition with a None element).
Attributes
- __init__()#
- __new__(**kwargs)#
- bapp(lhs)[source]#
Backward application composition.
- Parameters:
lhs (CCGComposable)
- Return type:
- compose(rhs, composition_type)[source]#
Compose this element with another element. This function will call the corresponding composition function according to the composition type. Note that since the coordination composition has three arguments, this function will return a
CCGCoordinationImmNode
for the first two arguments in coordination composition.- Parameters:
rhs (CCGComposable | CCGCoordinationImmNode) – the right-hand side element.
composition_type (CCGCompositionType) – the composition type.
- Returns:
The composed element.
- Return type:
- coord(other)[source]#
Coordination composition.
- Parameters:
other (CCGComposable | CCGCoordinationImmNode)
- Return type:
- coord3(lhs, rhs)[source]#
Coordination composition with three elements.
- Parameters:
lhs (CCGComposable)
rhs (CCGComposable)
- Return type:
- fapp(rhs)[source]#
Forward application composition.
- Parameters:
rhs (CCGComposable)
- Return type:
- none(rhs)[source]#
None composition (composition with a None element).
- Parameters:
rhs (CCGComposable)
- Return type: