edsnlp.pipelines.core.context
context
ContextAdder
Bases: BaseComponent
Provides a generic context adder component.
PARAMETER | DESCRIPTION |
---|---|
nlp |
The spaCy object.
TYPE:
|
context |
The list of extensions to add to the
TYPE:
|
Source code in edsnlp/pipelines/core/context/context.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
nlp = nlp
instance-attribute
context = context
instance-attribute
__init__(nlp, context)
Source code in edsnlp/pipelines/core/context/context.py
21 22 23 24 25 26 27 28 29 |
|
set_extensions()
Source code in edsnlp/pipelines/core/context/context.py
31 32 33 34 |
|
__call__(doc)
Source code in edsnlp/pipelines/core/context/context.py
36 37 |
|
factory
DEFAULT_CONFIG = dict(context=['note_id'])
module-attribute
create_component(nlp, name, context)
Source code in edsnlp/pipelines/core/context/factory.py
12 13 14 15 16 17 18 19 20 21 22 |
|