:py:mod:`medcat.ner.vocab_based_annotator` ========================================== .. py:module:: medcat.ner.vocab_based_annotator .. autoapi-nested-parse:: I would just ignore this whole class, it's just a lot of rules that work nicely for CDB once the software is trained the main thing are the context vectors. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: medcat.ner.vocab_based_annotator.maybe_annotate_name Attributes ~~~~~~~~~~ .. autoapisummary:: medcat.ner.vocab_based_annotator.logger .. py:data:: logger .. py:function:: maybe_annotate_name(name, tkns, doc, cdb, config, label = 'concept') Given a name it will check should it be annotated based on config rules. If yes the annotation will be added to the doc._.ents array. :param name: The name found in the text of the document. :type name: str :param tkns: Tokens that belong to this name in the spacy document. :type tkns: List[spacy.tokens.Token] :param doc: Spacy document to be annotated with named entities. :type doc: Doc :param cdb: Concept database. :type cdb: CDB :param config: Global config for medcat. :type config: Config :param label: Label for this name (usually `concept` if we are using a vocab based approach). :type label: str :Returns: **Optional[Span]** -- The Span, if relevant.