Open iaditij opened 2 years ago
You would have to change the output yourself in order to sort them according to appearance in the text. As a default, KeyBERT returns the keywords ordered by importance. You could, for example, use the internal CountVectorizer to split up the document into words and re-order the keywords by their appearance in the text.
I am getting results arranged according to the importance
keyword_extracted=self.keyword_exctraction(text)
text = "i want Iphone 14 purple"
The results i am getting is : [('iphone', 0.5916), ('purple', 0.5219), ('14', 0.272)]
But the language order of the result should be "iphone 14 purple" How can we get results in order via keybert?