neurolang.frontend.drs.drs_builder module

class neurolang.frontend.drs.drs_builder.DRS(referents, expressions)

Bases: Expression

Methods

__call__(*args, **kwargs)

Call self as a function.

apply(*args)

Builds a new expression using a tuple of its parameters

type

unapply()

Returns a tuple of parameters used to build the expression.

cast

change_type

get_wrapped_attribute

type = typing.Any
class neurolang.frontend.drs.drs_builder.DRS2FOL(*args, **kwargs)

Bases: ExpressionWalker

Attributes:
patterns

Property holding an iterator of triplets (pattern, guard, action).

Methods

match(expression)

Find the action for a given expression by going through the patterns.

pattern_match(pattern, expression)

Return True if pattern matches expression.

type

drs

implication

pattern_match_expression

pattern_match_expression_parameters

pattern_match_expression_tuple

pattern_match_tuple

process_expression

process_iterable_argument

unary_conjunction

walk

drs(drs)
implication(impl)
type = typing.Any
unary_conjunction(conj)
class neurolang.frontend.drs.drs_builder.DRSBuilder(grammar)

Bases: ExpressionWalker

Attributes:
patterns

Property holding an iterator of triplets (pattern, guard, action).

Methods

match(expression)

Find the action for a given expression by going through the patterns.

pattern_match(pattern, expression)

Return True if pattern matches expression.

type

comma_and

conditional

float_drs

implication

indefinite_noun_phrase

join_drs

lit_noun_phrase

pattern_match_expression

pattern_match_expression_parameters

pattern_match_expression_tuple

pattern_match_tuple

predicate

process_expression

process_iterable_argument

proper_names

quoted_predicate

sentence_list

simple_and

single_sentence_list

var_apposition

var_noun_phrase

walk

comma_and(s)
conditional(s)
float_drs(fa)
implication(impl)
indefinite_noun_phrase(np)
join_drs(drs)
lit_noun_phrase(np)
predicate(s)
proper_names(np)
quoted_predicate(s)
sentence_list(sl)
simple_and(s)
single_sentence_list(sl)
type = typing.Any
var_apposition(np)
var_noun_phrase(np)
neurolang.frontend.drs.drs_builder.indent(s, tab='    ')