lenskit.data.schema.AllowableTroolean#

class lenskit.data.schema.AllowableTroolean#

Bases: enum.Enum

Stores both whether a feature is allowed and is used in the case of having repeats. For convenience, in serialized data or configuration files these values may be specified either as strings or as booleans, in which case False is FORBIDDEN and True is ALLOWED. They are always serialized as strings.

FORBIDDEN = 'forbidden'#

The feature is forbidden.

ALLOWED = 'allowed'#

The feature is allowed, but no records using it are present.

PRESENT = 'present'#

The feature is used by instances in the data.

property is_allowed: bool#

Query whether the feature is allowed.

Return type:

bool

property is_forbidden: bool#

Query whether the feature is forbidden.

Return type:

bool

property is_present: bool#

Query whether the feature is present (used in recorded instances).

Return type:

bool