Obtain entity offsets
#1
by vertex-cover - opened
Hi! Is there a way to obtain the entity offsets of the recognized entities in the original text?
entities = self.model.extract_entities(
string,
self.supported_entities,
threshold=self.threshold,
include_confidence=True,
include_spans=True,
)
Yes, you just need to enable include_spans.