class documentation

Class representing a variable CCG category. Used for conjunctions (and possibly type-raising, if implemented as a unary rule).

Class Method new_id A class method allowing generation of unique variable identifiers.
Class Method reset_id Undocumented
Method __init__ Initialize a variable (selects a new identifier)
Method __str__ Undocumented
Method can_unify If the variable can be replaced with other a substitution is returned.
Method id Undocumented
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 If there is a substitution corresponding to this variable, return the substituted category.
Class Variable _maxID Undocumented
Instance Variable _comparison_key Undocumented
Instance Variable _id Undocumented
Instance Variable _prim_only Undocumented

Inherited from AbstractCCGCategory:

Method __eq__ Undocumented
Method __hash__ Undocumented
Method __lt__ Undocumented
Method __ne__ Undocumented
Instance Variable _hash Undocumented
@classmethod
def new_id(cls): (source)

A class method allowing generation of unique variable identifiers.

@classmethod
def reset_id(cls): (source)

Undocumented

def __init__(self, prim_only=False): (source)

Initialize a variable (selects a new identifier)

Parameters
prim_only:boola boolean that determines whether the variable is restricted to primitives
def __str__(self): (source)
def can_unify(self, other): (source)

If the variable can be replaced with other a substitution is returned.

def id(self): (source)

Undocumented

def is_function(self): (source)

Returns true if the category is a function application.

def is_primitive(self): (source)

Returns true if the category is primitive.

def is_var(self): (source)

Returns true if the category is a variable.

def substitute(self, substitutions): (source)

If there is a substitution corresponding to this variable, return the substituted category.

_maxID: int = (source)

Undocumented

_comparison_key = (source)

Undocumented

Undocumented

_prim_only = (source)

Undocumented