nlu.annotation.joint_bert.slot_mapping

Mapping of slot and intent labels to indices for JointBERT model.

Module Contents

Classes

EnumWithMapping

Generic enumeration.

JointBERTIntent

Generic enumeration.

JointBERTSlot

Generic enumeration.

class nlu.annotation.joint_bert.slot_mapping.EnumWithMapping

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

classmethod to_index(name: str) int
classmethod from_index(index: int) EnumWithMapping
class nlu.annotation.joint_bert.slot_mapping.JointBERTIntent

Bases: EnumWithMapping

Generic enumeration.

Derive from this class to define new enumerations.

REVEAL
INQUIRE
REMOVE_PREFERENCE
REJECT
ACCEPT
CONTINUE_RECOMMENDATION
RESTART
UNK
ACKNOWLEDGE
DENY
HI
BYE
class nlu.annotation.joint_bert.slot_mapping.JointBERTSlot

Bases: EnumWithMapping

Generic enumeration.

Derive from this class to define new enumerations.

OUT
B_PREFERENCE_MODIFIER
I_PREFERENCE_MODIFIER
B_PREFERENCE_MODIFIER_YEAR
I_PREFERENCE_MODIFIER_YEAR
B_PREFERENCE_GENRES
I_PREFERENCE_GENRES
B_PREFERENCE_ACTORS
I_PREFERENCE_ACTORS
B_PREFERENCE_DIRECTORS
I_PREFERENCE_DIRECTORS
B_PREFERENCE_KEYWORDS
I_PREFERENCE_KEYWORDS
B_PREFERENCE_YEAR
I_PREFERENCE_YEAR
B_INQUIRE_GENRES
I_INQUIRE_GENRES
B_INQUIRE_RATING
I_INQUIRE_RATING
B_INQUIRE_DURATION
I_INQUIRE_DURATION
B_INQUIRE_PLOT
I_INQUIRE_PLOT
B_INQUIRE_ACTORS
I_INQUIRE_ACTORS
B_INQUIRE_DIRECTORS
I_INQUIRE_DIRECTORS
B_INQUIRE_YEAR
I_INQUIRE_YEAR
is_start() bool

Returns True if the slot is a starting point for a slot value.

is_inside() bool

Returns True if the slot is inside a slot value.