Unknown model· unknown
from ShareGPT 90K (shared ChatGPT conversations)
explain all the parameters of keybert library
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
explain all the parameters of keybert library
- Assistant
KeyBERT is a Python library that allows for easy and efficient keyword extraction from text using the BERT language model. Here are the parameters available in KeyBERT:
model: This is the BERT language model used for keyword extraction. By default, KeyBERT uses thedistilbert-base-nli-mean-tokenspre-trained model, but you can specify a different BERT model using themodelparameter.mix_embeddings: This parameter determines whether to use the BERT embeddings only or to mix them with TF-IDF embeddings. By default,mix_embeddings=Truewhich means that KeyBERT will mix BERT and TF-IDF embeddings.stop_words: This parameter is a list of stop words to exclude from the keyword extraction. By default, it is set toNone, which means that no stop words are used.use_maxsum: This parameter determines whether to use Max Sum Similarity or Maximal Marginal Relevance (MMR) as the optimization algorithm for selecting the most relevant keywords. By default,use_maxsum=True, which means that Max Sum Similarity is used.top_n: This parameter determines the number of top keywords to return. By default, it is set to 10.min_df: This parameter sets the minimum document frequency for a word to be considered as a keyword. By default, it is set to 1.verbose: This parameter determines whether to print debugging information during keyword extraction. By default, it is set toFalse.tokenizer: This parameter sets the tokenizer used by the BERT model. By default, KeyBERT uses theAutoTokenizer.from_pretrainedmethod to load the tokenizer for the specified BERT model.dim: This parameter determines the dimensionality of the embeddings. By default, it is set to 768, which is the dimensionality of the embeddings for thedistilbert-base-nli-mean-tokensmodel.batch_size: This parameter determines the batch size used during keyword extraction. By default, it is set to 16.max_length: This parameter sets the maximum length of the input text for keyword extraction. By default, it is set to 512.