Open homepsyc opened 1 year ago
Could you share your entire code for getting this error? Seeing your code and having a reproducible example would help in identifying what is exactly happening here.
from keyphrase_vectorizers import KeyphraseCountVectorizer
vectorizer = KeyphraseCountVectorizer()
keyword4 = model.extract_keywords(doc, vectorizer=vectorizer, highlight=True)
Thanks @MaartenGr
Ah, it seems that since KeyphraseCountVectorizer discovers its own n-gram range and because of that it does not have a ngram_range
attribute. Moreover, since it is technically not a scikit-learn CountVectorizer other function, like build_tokenizer()
are missing. Unfortunately, there is no quick fix for this as it may require large changes on either side.
KeyphraseCountVectorizer used to work with Keybert but now with 0.7.0 it failed with highlight_document():
Exception says:
which is expected for KeyphraseCountVectorizer.
Please kindly advise, thanks.