medcat.linking.context_based_linker

Module Contents

Classes

Linker

Link to a biomedical database.

Attributes

logger

medcat.linking.context_based_linker.logger
class medcat.linking.context_based_linker.Linker(cdb, vocab, config)

Bases: medcat.pipeline.pipe_runner.PipeRunner

Link to a biomedical database.

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

  • vocab (Vocab) – The vocabulary.

  • config (Config) – The config.

name = 'cat_linker'
__init__(cdb, vocab, config)
Parameters:
Return type:

None

_train(cui, entity, doc, add_negative=True)
Parameters:
  • cui (str) –

  • entity (spacy.tokens.Span) –

  • doc (spacy.tokens.Doc) –

  • add_negative (bool) –

Return type:

None

__call__(doc)
Parameters:

doc (spacy.tokens.Doc) –

Return type:

spacy.tokens.Doc