orkgnlp.annotation.rfclf.decoder.ResearchFieldClassifierDecoder
- class ResearchFieldClassifierDecoder(label_dict)[source]
Bases:
ORKGNLPBaseDecoder
The ResearchFieldClassifierDecoder decodes the ResearchFieldClassifier service model’s output to a user-friendly one.
- Parameters
label_dict (Dict[str, int]) – Classifier label mapping.
Methods
Decodes the model's
output
to 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
output
to a user-friendly format.- Parameters
model_output (
Union
[Any
,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.