Extraction class encapsulates information extracted from text, including its characteristics and position within the source text. It can represent diverse information for NLP information extraction tasks.
Constructor
The class or category of the extraction (e.g., “PERSON”, “DATE”, “LOCATION”)
The actual text content of the extraction
The token-level position of the extraction in the tokenized text
The character-level position of the extraction in the original text
The alignment status indicating how well the extraction matches the source text
The index of this extraction in the list of all extractions
The index of the group this extraction belongs to
An optional description providing additional context about the extraction
Additional attributes associated with the extraction as key-value pairs
Attributes
The class or category of the extraction
The actual text content of the extraction
The character-level position of the extraction in the original text
The alignment status indicating how well the extraction matches the source text
The index of this extraction in the list of all extractions
The index of the group this extraction belongs to
An optional description providing additional context about the extraction
Additional attributes associated with the extraction as key-value pairs
The token-level position of the extraction in the tokenized text (property)
Example
Related Classes
CharInterval- Represents character positions (nested class withstart_posandend_pos)AlignmentStatus- Enum for alignment quality (values: MATCH_EXACT, MATCH_FUZZY, MATCH_LESSER, MATCH_GREATER)- AnnotatedDocument - Contains multiple extractions