medkit.text.ner.iamsystem_matcher
medkit.text.ner.iamsystem_matcher#
Classes:
|
Entity annotator and linker based on iamsystem library |
|
A recommended iamsystem's IEntity implementation. |
- class IAMSystemMatcher(matcher, label_provider=None, attrs_to_copy=None, name=None, uid=None)[source]#
Entity annotator and linker based on iamsystem library
Instantiate the operation supporting the iamsystem matcher
- Parameters
matcher (
Matcher
) – IAM system Matcherlabel_provider (
Optional
[Callable
[[Sequence
[IKeyword
]],Optional
[str
]]]) – Callable providing the output label to set for detected entity. As iamsystem matcher may return several keywords for an annotation, we have to know how to provide only one entity label whatever the number of matched keywords. In medkit, normalization attributes are used for representing detected keywords.attrs_to_copy (
Optional
[List
[str
]]) – Labels of the attributes that should be copied from the input segment to the created entity. Useful for propagating context attributes (negation, antecedent, etc).name (
Optional
[str
]) – Name describing the matcher (defaults to the class name)uid (str) – Identifier of the operation
Attributes:
Contains all the operation init parameters.
Methods:
set_prov_tracer
(prov_tracer)Enable provenance tracing.
- property description: medkit.core.operation_desc.OperationDescription#
Contains all the operation init parameters.
- Return type
- set_prov_tracer(prov_tracer)#
Enable provenance tracing.
- Parameters
prov_tracer (
ProvTracer
) – The provenance tracer used to trace the provenance.
- class MedkitKeyword(label, kb_id, kb_name, ent_label)[source]#
A recommended iamsystem’s IEntity implementation.
This class is implemented to allow user to define one of both values of kb_id or kb_name with its iamsystem keyword. The entity label may be also provided if the user wants to define a category for the searched keyword (e.g., “drug” label for “Vicodin” keyword)
Also implements
SupportEntLabel
,SupportKBName
protocols