nlu.annotation.slot_annotator¶
This file contains a class which can be used to annotate slot values in the user utterance.
Module Contents¶
Classes¶
This class is used to annotate slot values in the user utterance. |
- class nlu.annotation.slot_annotator.SlotAnnotator¶
Bases:
abc.ABCThis class is used to annotate slot values in the user utterance.
- abstract slot_annotation(slot: moviebot.nlu.annotation.slots.Slots, utterance: moviebot.core.utterance.utterance.UserUtterance) List[moviebot.nlu.annotation.item_constraint.ItemConstraint]¶
Given utterance and a slot return a list of triplets of (slot, operator, value).
IMPORTANT: This will be changed to return semantic annotations instead!
- Parameters:
slot (Slots) – Slot for which to annotate
utterance (UserUtterance) – User utterance class which contains both original utterance and utterance tokens.
- Raises:
NotImplementedError – Must be overridden
- Returns:
List of constraints
- Return type:
List[ItemConstraint]