Normalization#
Normalization module is used to normalize all python objects and functions to a format that is suitable for script and actor execution process. This module contains a basic set of functions for normalizing data in a dialog script.
- normalize_label(label, default_flow_label='')[source]#
The function that is used for normalization of
default_flow_label
.- Parameters:
label (
Union
[Callable
,Tuple
[str
,float
],Tuple
[str
,str
],Tuple
[str
,str
,float
],str
]) – If label is Callable the function is wrapped into try/except and normalization is used on the result of the function call with the name label.default_flow_label (
Union
[str
,Keywords
]) – flow_label is used if label does not contain flow_label.
- Return type:
Union
[Callable
[[Context
,Pipeline
],Tuple
[str
,str
,float
]],Tuple
[str
,str
,float
]]- Returns:
Result of the label normalization, if Callable is returned, the normalized result is returned.