concepts.language.ccg.search.CCGSemanticsEnumerativeSearcher#

class CCGSemanticsEnumerativeSearcher[source]#

Bases: CCGSemanticsSearcherBase

Enumerative searcher for semantics.

Methods

gen([max_depth, return_type, ...])

Generate a list of candidate semantic forms.

gen_constant_semantics([return_type])

Generate a list of candidate semantic forms that are simply constants.

gen_function_semantics([return_type, ...])

gen_lambda(f1[, arg_index, f2])

__init__(domain)[source]#

Initialize the searcher.

Parameters:

domain (FunctionDomain) – the domain of the semantics.

__new__(**kwargs)#
gen(max_depth=ARGDEF, return_type=None, max_variable_arguments=ARGDEF, max_constant_arguments=ARGDEF, max_function_arguments=ARGDEF, search_constants=ARGDEF, hash_function=None, verbose=False)[source]#

Generate a list of candidate semantic forms.

Parameters:
Returns:

A list of candidate semantic forms.

Return type:

List[CCGSemanticsSearchResult]

gen_constant_semantics(return_type=None)[source]#

Generate a list of candidate semantic forms that are simply constants.

Parameters:

return_type (ObjectType | ValueType | FunctionType | Tuple[ObjectType | ValueType | FunctionType, ...] | List[ObjectType | ValueType | FunctionType] | None) – the return type of the semantics.

Returns:

A list of candidate semantic forms.

Return type:

List[CCGSemanticsSearchResult]

gen_function_semantics(return_type=None, *, max_depth=3, max_variable_arguments=2, max_constant_arguments=1, max_function_arguments=0, search_constants=False, hash_function=None, verbose=False)[source]#
Parameters:
Return type:

List[CCGSemanticsSearchResult]

static gen_lambda(f1, arg_index=None, f2=None)[source]#
Parameters: