medcat.utils.postprocessing

Module Contents

Classes

LabelStyle

Generic enumeration.

Functions

map_ents_to_groups(cdb, doc)

make_pretty_labels(cdb, doc[, style])

create_main_ann(cdb, doc[, tuis])

Creates annotation in the spacy ents list

class medcat.utils.postprocessing.LabelStyle

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

short
long
medcat.utils.postprocessing.map_ents_to_groups(cdb, doc)
Parameters:
Return type:

None

medcat.utils.postprocessing.make_pretty_labels(cdb, doc, style=None)
Parameters:
Return type:

None

medcat.utils.postprocessing.create_main_ann(cdb, doc, tuis=None)

Creates annotation in the spacy ents list from all the annotations for this document.

Parameters:
  • cdb (CDB) – The Context Databse.

  • doc (Doc) – Spacy document.

  • tuis (Optional[List], optional) – The type IDs. Defaults to None.

Return type:

None