Text Annotator Interface

class oaklib.interfaces.text_annotator_interface.TextAnnotatorInterface(resource: Optional[oaklib.resource.OntologyResource] = None, strict: bool = False)[source]

Performs Named Entity Recognition on texts

Currently this is only partially implemented by BioportalInterface

potential implementations:

  • zooma

  • scigraph-annotator

  • ontorunner

  • spacy

annotate_text(text: str, configuration: Optional[oaklib.datamodels.text_annotator.TextAnnotationConfiguration] = None) Iterable[oaklib.datamodels.text_annotator.TextAnnotation][source]

Annotate a piece of text

Note

the signature of this method may change

Parameters
  • text

  • configuration

Returns

class oaklib.datamodels.text_annotator.TextAnnotation(*args, _if_missing: Optional[Callable[[jsonasobj2._jsonobj.JsonObj, str], Tuple[bool, Any]]] = None, **kwargs)[source]

An individual text annotation