concepts.language.neural_ccg.grammar#
The grammar components for neural CCGs, including syntax types, semantic forms, lexicon, and the parser.
There are a few debug options that can be enabled by setting the corresponding flags to True, see the
foptions
variable for details.
Module attributes
Options for the CCG parser. |
Functions
|
Compose two neural CCG nodes. |
|
Count the number of execution steps from a list of parsing results. |
|
Generate a dictionary of used lexicon entries from a list of parsing results. |
|
Parse a linearization string (e.g., |
Classes
A pair of (index, direction) for representing linearization of function arguments. |
|
The neural CCG grammar and the implementation for parsing. |
|
A wrapper for the underlying implementation of a conjunction-typed semantic form (e.g., AND). |
|
Data structure for conjunction syntax types. |
|
A data structure contains the implementation of a function (for neural CCG semantics). |
|
A node in the Neural CCG parsing tree. |
|
We implement the execution result of the current subtree in the following way: For primitive types (syntax.is_value == True), the execution_buffer field is a list containing a single element recording the execution result. |
|
A small data structure that contains the execution buffer, partial type, and number of execution steps. |
|
A data structure that will be used in representing the semantic type of a partially applied function. |
|
A simple implementation for conjunction-typed semantics. |
|
Data structure for neural CCG syntax types. |