pytext.data.data_structures package¶
Submodules¶
pytext.data.data_structures.annotation module¶
-
class
pytext.data.data_structures.annotation.
Annotation
(annotation_string: str, utterance: str = '', brackets: str = '[]', combination_labels: bool = True, add_dict_feat: bool = False, accept_flat_intents_slots: bool = False)[source]¶ Bases:
object
-
class
pytext.data.data_structures.annotation.
Node_Info
(node)[source]¶ Bases:
object
This class extracts the essential information for a mode, for use in rules.
-
class
pytext.data.data_structures.annotation.
Token_Info
(node)[source]¶ Bases:
object
This class extracts the essential information for a token for use in rules.
-
class
pytext.data.data_structures.annotation.
Tree
(root: pytext.data.data_structures.annotation.Root, combination_labels: bool, utterance: str = '', validate_tree: bool = True)[source]¶ Bases:
object
-
lotv_str
()[source]¶ LOTV – Limited Output Token Vocabulary We map the terminal tokens in the input to a constant output (SEQLOGICAL_LOTV_TOKEN) to make the parsing task easier for models where the decoding is decoupled from the input (e.g. seq2seq). This way, the model can focus on learning to predict the parse tree, rather than waste effort learning to replicate terminal tokens.
-
pytext.data.data_structures.node module¶
-
class
pytext.data.data_structures.node.
Node
(label: str, span: pytext.data.data_structures.node.Span, children: Optional[AbstractSet[Node]] = None, text: str = None)[source]¶ Bases:
object
Node in an intent-slot tree, representing either an intent or a slot.
-
label
¶ Label of the node.
Type: str
-
span
¶ Span of the node.
Type: Span
-
children
-
label
-
span
-
text
¶
-