neurolang.commands module

class neurolang.commands.CommandsMixin(*args, **kwargs)

Bases: PatternWalker

Attributes:
patterns

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

Methods

load_atlas(command)

Process the .load_atlas command.

load_csv(command)

Process the .load_csv command.

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

pattern_match_expression

pattern_match_expression_parameters

pattern_match_expression_tuple

pattern_match_tuple

walk

load_atlas(command)

Process the .load_atlas command. The load_atlas command fetches an atlas image with its corresponding labels and loads it into the neurolang instance.

Raises:
InvalidCommandExpression

raised if command args are invalid or if an error occurs while loading the data

load_csv(command)

Process the .load_csv command. The load_csv command fetches tabular data from a given url (using pandas’ read_csv method) and loads it into a relation with the given Symbol name.

Raises:
InvalidCommandExpression

raised if command args are invalid or if an error occurs while loading the data

type = typing.Any