orkgnlp.annotation.tdm.decoder.TdmExtractorDecoder

class TdmExtractorDecoder(labels)[source]

Bases: ORKGNLPBaseDecoder

The 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

decode

Decodes the model's output to a user-friendly format.

release_memory

Releases the memory of all available attributes in a pipeline component.

decode(model_output, top_n, **kwargs)[source]

Decodes the model’s output to 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.