|`pretrained_model_name` | The name of the pre-trained model| {'bert','xlnet'}|
|`pretrained_model_path` | The path of the fine-tuned model| str |
|`top_keywords` | The number of the top keywords of texts| int|
|`diversity` | The diversity ([0,1]) of the top produced keywords. A high diversity score will create very diverse keyphrases/keywords compared with low diversity, which will produce very similar keywords with the respective ones using the cosine similarity method: | float|
|`n_gram_range` | The different lengths of keyphrases| tuple of shape (range_x,range_y)|
|`sentence_model_name ` | The name of the pre-trained sentence model| {'all-mpnet-base-v2','distilbert-base-nli-mean-tokens','all-MiniLM-L6-v2'}|
### Methods
##### predict(text,return_association=False)
Find the most relevant SDGs in the provided texts and computes the association of each text with the SDGs using the pre-trained fine-tuned model and the method of keywords extraction. The formula of the association is
The above formula has two branches, because the OSDG community dataset, which have used for the Classification Task includes only texts related to the first 16 SDGs. So, for SDG 17 we get only the results from the Keywords Extraction technique multiplied with a coefficient equals to 0.5.
|`text`: list of length (# of texts) | Input texts |`sdg` : list of length (# of texts) | Returns the the most relevant SDG per text |
| `return_association`: Boolean| If set to True then returns the association of each text with the SDGs |`sdg_name`: list of length (# of texts) | Returns the name of the most relevant SDG per text |
| | |`association`: list of lists (association of length 17) of length (# of texts)| Returns the association of each text with each one of the SDGs.|