orkgnlp.annotation.agriner.annotator.AgriNer
- class AgriNer(*args, **kwargs)[source]
Bases:
ORKGNLPBaseService
The AgriNer requires a classification model trained on titles and its configurations obtained during the training. The required files are downloaded while initiation, if it has not happened before.
You can pass the parameter
force_download=True
to remove and re-download the previous downloaded service files.- Parameters
service – Service name.
force_download – Indicates whether the required files are to be downloaded again. Defaults to False.
batch_size – Size of the batches used during model prediction. This argument is used by services that applies batch evaluation. Defaults to 16.
Methods
Releases the memory of all available executors.
Attributes
SERVICE_NAME
- __call__(title)[source]
Applies Named Entity Recognition on the given paper’s title.
- Parameters
title (
str
) – Paper’s title.- Return type
Any
- Returns
A list of the annotated parts for the given text is returned.
- release_memory()
Releases the memory of all available executors.