- class asreview.models.feature_extraction.SBERT(*args, transformer_model='all-mpnet-base-v2', **kwargs)
Sentence BERT feature extraction technique (
By setting the
transformer_modelparameter, you can use other transformer models. For example,
transformer_model='bert-base-nli-stsb- large'. For a list of available models, see the Sentence BERT documentation.
Sentence BERT is a sentence embedding model that is trained on a large corpus of human written text. It is a fast and accurate model that can be used for many tasks.
The huggingface library includes multilingual text classification models. If your dataset contains records with multiple languages, you can use the
transformer_modelparameter to select the model that is most suitable for your data.
This feature extraction technique requires
sentence_transformersto be installed. Use
pip install sentence_transformersor install all optional ASReview dependencies with
pip install asreview[all]to install the package.
transformer_model (str, optional) – The transformer model to use. Default: ‘all-mpnet-base-v2’
Get the default parameters of the model.
Get the (assigned) parameters of the model.
Fit the model to the texts.
fit_transform(texts[, titles, abstracts, ...])
Fit and transform a list of texts.
Transform a list of texts.