Descriptor
- class Descriptor(*args: Any)[source]
Bases:
KIF_Object
Abstract base class for descriptors.
- class AttributeMask(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Flags
Mask for descriptor attributes.
- LABEL = 1
Mask for the label attribute of descriptor.
- ALIASES = 2
Mask for the aliases attribute of descriptor.
- DESCRIPTION = 4
Mask for the description attribute of descriptor.
- DATATYPE = 8
Mask for the datatype attribute of descriptor.
- LEMMA = 16
Mask for the lemma attribute of descriptor.
- CATEGORY = 32
Mask for the lexical category attribute of descriptor.
- LANGUAGE = 64
Mask for the language attribute of descriptor.
- ITEM_DESCRIPTOR_ATTRIBUTES = 7
Mask for all attributes of item descriptor.
- PROPERTY_DESCRIPTOR_ATTRIBUTES = 15
Mask for all attributes of property descriptor.
- LEXEME_DESCRIPTOR_ATTRIBUTES = 112
Mask for all attributes of lexeme descriptor.
- ALL = 127
Mask for all attributes of descriptor.
- LABEL: Final[AttributeMask] = 1
Mask for the label attribute of descriptor.
- ALIASES: Final[AttributeMask] = 2
Mask for the aliases attribute of descriptor.
- DESCRIPTION: Final[AttributeMask] = 4
Mask for the description attribute of descriptor.
- DATATYPE: Final[AttributeMask] = 8
Mask for the datatype attribute of descriptor.
- LEMMA: Final[AttributeMask] = 16
Mask for the lemma attribute of descriptor.
- CATEGORY: Final[AttributeMask] = 32
Mask for the lexical category attribute of descriptor.
- LANGUAGE: Final[AttributeMask] = 64
Mask for the language attribute of descriptor.
- ITEM_DESCRIPTOR_ATTRIBUTES: Final[AttributeMask] = 7
Mask for all attributes of item descriptor.
- PROPERTY_DESCRIPTOR_ATTRIBUTES: Final[AttributeMask] = 15
Mask for all attributes of property descriptor.
- LEXEME_DESCRIPTOR_ATTRIBUTES: Final[AttributeMask] = 112
Mask for all attributes of lexeme descriptor.
- ALL: Final[AttributeMask] = 127
Mask for all attributes of descriptor.
- class PlainDescriptor(*args: Any)[source]
Bases:
Descriptor
Abstract base class for plain descriptors.
- class ItemDescriptor(label: TText | None = None, aliases: TTextSet | None = None, description: TText | None = None)[source]
Bases:
PlainDescriptor
Item descriptor.
- Parameters:
label – Label.
aliases – Aliases.
description – Description.
- class PropertyDescriptor(label: TText | None = None, aliases: TTextSet | None = None, description: TText | None = None, datatype: TDatatype | None = None)[source]
Bases:
PlainDescriptor
Property descriptor.
- Parameters:
label – Label.
aliases – Aliases.
description – Description.
datatype – Datatype.
- __init__(label: TText | None = None, aliases: TTextSet | None = None, description: TText | None = None, datatype: TDatatype | None = None) None [source]
- property datatype: Datatype | None
The datatype of property descriptor.
- class LexemeDescriptor(lemma: TText | None = None, category: TItem | None = None, language: TItem | None = None)[source]
Bases:
Descriptor
Lexeme descriptor.
- Parameters:
lemma – Lemma.
category – Lexical category.
language – Language.
- __init__(lemma: TText | None = None, category: TItem | None = None, language: TItem | None = None) None [source]
- get_lemma(default: Text | None = None) Text | None [source]
Gets the lemma of lexeme descriptor.
If the lemma is
None
, returns default.- Parameters:
default – Default lemma.
- Returns:
Lemma.