Closed failable closed 3 years ago
Yes! You can change the length of the extracted keyphrases with model.extract_keywords(doc, keyphrase_length=3, stop_words=None)
where keyphrase_length
is the number of words in your keyphrase. Note that although it is possible to set a variable keyphrase length between two values, for example between 2 and 5 words, the model is highly likely to select the longest phrase. Therefore, it is advised to choose a length and experiment yourself with the length that suits your application best.
Thank you for the hints!
Does this library support variable keyphrase length?