orkgnlp.annotation.tdm.decoder.TdmExtractorDecoder
- class TdmExtractorDecoder(labels)[source]
Bases:
ORKGNLPBaseDecoderThe TdmExtractorDecoder decodes the TDM-Extraction service model’s output to a user-friendly one.
- Parameters:
labels (
DataFrame) – TDM gold labels given as one-columned-dataframe
Methods
Decodes the model's
outputto a user-friendly format.Releases the memory of all available attributes in a pipeline component.
- decode(model_output, top_n, **kwargs)[source]
Decodes the model’s
outputto a user-friendly format.- Parameters:
model_output (
Generator[Any,None,None]) – The model’s output to be decoded.- Return type:
Any- Returns:
The user-friendly output.
- release_memory()
Releases the memory of all available attributes in a pipeline component.