Relation extraction tasks utilities
Last updated
Last updated
Subclass of .
text (str): Text to process.
relations (List[]): Relations parameters.
entities (List[]): Entities to use.
Subclass of .
relation (str): Relation label.
pairs_filter (Optional[List[Tuple[str, str]]], optional): Expected pairs for relation. If equals to None all pairs will be returned. Defaults to None.
distance_threshold (int, optional): Distance threshold. It specifies the max distance between spans in the text (i.e., the end of the span that is closer to the start of the text and the start of the next one). Defaults to -1 (no distance threshold).
relation (str): Relation label.
score (float): Relation score.
output (List[]): Relations triplets.
source (): Source entity in the relation.
target (): Target entity in the relation.