concepts.language.neural_ccg.search.NeuralCCGLexiconEnumerativeSearcherWithSyntax#

class NeuralCCGLexiconEnumerativeSearcherWithSyntax[source]#

Bases: NeuralCCGLexiconSearcherBase

An enumerative neural CCG lexicon searcher. This function also searches for the linguistic syntax type of the semantic form.

Methods

gen([init_executor, allow_none_lexicon, ...])

Generate a list of candidate lexicons.

is_compatible(semantics_type, syntax_type)

is_primitive_compatible(dsl_type, syntax_type)

__init__(candidate_expressions, allowed_syntax_types, executor, primitive_syntax_compatible=Callable[[TypeBase, CCGPrimitiveSyntaxType], bool])[source]#

Initialize the searcher.

Parameters:
__new__(**kwargs)#
gen(init_executor=True, allow_none_lexicon=False, semantics_hash=None)[source]#

Generate a list of candidate lexicons.

Returns:

A list of candidate lexicons, as a list of NeuralCCGLexiconSearchResult.

Parameters:
Return type:

List[NeuralCCGLexiconSearchResult]

is_compatible(semantics_type, syntax_type)[source]#
Parameters:
is_primitive_compatible(dsl_type, syntax_type)[source]#
Parameters: