orkgnlp.clustering.predicates.recommender.PredicatesRecommender
- class PredicatesRecommender(*args, **kwargs)[source]
Bases:
ORKGNLPBaseService
The PredicatesRecommender requires a clustering model, vectorizer, training set and predicates. 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, abstract)[source]
Recommends predicates for a research paper.
- Parameters
title (
str
) – Title of the research paper.abstract (
str
) – Abstract of the research paper.
- Returns
List of predicates.
- release_memory()
Releases the memory of all available executors.