GLiNERQandA
Q&A task
Last updated
Q&A task
Last updated
This task usesby default.
For more details, see:
By default, the predictor uses the model. Learn more about the model here:
Main methods and properties
name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.
text (str): Text to use.
question (str): Question to answer.
text (str): Input text.
question (str): Answered question.
sents_batch (int): Chunks size in sentences. Defaults to 10.
threshold (float): Minimial score to put entities into the output (used by predictor). Defaults to 0.5.
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:
"text" (str): Text to process;
"question" (str): Question to answer;
Dict[str, Any]: Expected keys:
"texts" (List[str]): Model inputs;
"labels" (List[str]): Labels model inputs;
"chunks_starts" (List[int]): Chunks start positions. Used by postprocessor;
"threshold" (float): Minimal score for an entity to put into output;
input_data (Dict[str, Any]): Expected keys:
"output" (List[List[Dict[str, Any]]]): Model output;
"chunks_starts" (List[int]): Chunks starts;
"text" (str): Processed text;
"question" (str): Answered question.
Dict[str, Any]: Expected keys:
"text" (str): Processed text;
"question" (str): Answered question.
Subclass of .
predictor ([Any, Any], optional): Predictor that will be used in task. If equals to None, 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 .
Subclass of .
Subclass of . Type of [].
output (List[]): Answers.
Preprocess inputs. Subclass of . Type of [Dict[str, Any], Dict[str, Any]].
Format output. Subclass of . Type of [Dict[str, Any], Dict[str, Any]].
"output" (List[]): Answers;