TokenSearcherTextCleaner
Task for text cleaning
Last updated
Task for text cleaning
Last updated
Task for removing uninfomative data from text. This task usesby default. For more details, see:
Subclass of .
Main methods and properties
predictor ([Any, Any], optional): Predictor that will be used in task. If equals to None, default will be used. Defaults to None.
preprocess (Optional[], optional): Component executed before predictor. If equals to None, default component will be used. Defaults to None. Default component:
postprocess (Optional[], optional): Component executed after predictor. If equals to None, default component will be used. Defaults to None. Default component:
input_class (Type[], optional): Class for input validation. Defaults to .
output_class (Type[], optional): Class for output validation. Defaults to .
name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.
text (str): Text to clean.
text (str): Input text.
input_data (Dict[str, Any]): Expected keys:
"text" (str): Text to process;
Dict[str, Any]: Expected keys:
"inputs" (List[str]): Model inputs;
clean (bool): Remove uninformative data from text. Defaults to False.
threshold (float): Data threshold score. Defaults to 0.
name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.
input_data (Dict[str, Any]): Expected keys:
"output" (List[List[Dict[str, Any]]]): Model output;
"inputs" (List[str]): Model inputs;
"text" (str): Processed text;
Dict[str, Any]: Expected keys:
"text" (str): Processed text;
"cleaned_text" (Optional[str], optional): Cleaned text. Equals to None, if clean was set to False.
Subclass of .
Subclass of . Type of [].
cleaned_text (Optional[str], optional): Cleaned text. Equals to None, if clean was set to False in .
output (List[]): Uninformative data.
Create prompt with providied text. Subclass of . Type of [Dict[str, Any], Dict[str, Any]].
Format output and clean text if specified. Subclass of . Type of [Dict[str, Any], Dict[str, Any]].
"output" (List[]): uninformative data;