class documentation

Interface for categories in combinatory grammars.

Method __eq__ Undocumented
Method __hash__ Undocumented
Method __lt__ Undocumented
Method __ne__ Undocumented
Method __str__ Undocumented
Method can_unify Returns None if they cannot be unified
Method is_function Returns true if the category is a function application.
Method is_primitive Returns true if the category is primitive.
Method is_var Returns true if the category is a variable.
Method substitute Takes a set of (var, category) substitutions, and replaces every occurrence of the variable with the corresponding category.
Instance Variable _hash Undocumented
def __eq__(self, other): (source)

Undocumented

def __hash__(self): (source)

Undocumented

def __lt__(self, other): (source)

Undocumented

def __ne__(self, other): (source)

Undocumented

@abstractmethod
def __str__(self): (source)
@abstractmethod
def can_unify(self, other): (source)

Determines whether two categories can be unified.
  • Returns None if they cannot be unified
  • Returns a list of necessary substitutions if they can.

@abstractmethod
def is_function(self): (source)

Returns true if the category is a function application.

@abstractmethod
def is_primitive(self): (source)

Returns true if the category is primitive.

@abstractmethod
def is_var(self): (source)

Returns true if the category is a variable.

@abstractmethod
def substitute(self, substitutions): (source)

Takes a set of (var, category) substitutions, and replaces every occurrence of the variable with the corresponding category.

Undocumented