textrank icon indicating copy to clipboard operation
textrank copied to clipboard

Code for original Textrank algorithm (without similarity function optimizations)

Open alkakhurana opened this issue 3 years ago • 1 comments

Hi,

Is it possible to get the python implementation of original Textrank algorithm? or Can you suggest the changes that need to be done in the existing code for original Textrank?

I need to compare the summaries produced by both variations.

Thanks in advance

alkakhurana avatar Sep 30 '20 01:09 alkakhurana

Hi,

The version that is in this repository follows the original implementation of TextRank. You can have a look at the source code to calculate the similarities: https://github.com/summanlp/textrank/blob/master/summa/summarizer.py#L41

The version that we added on Gensim uses the optimizations, with the Okapi BM25 function. You can verify that in the source code in: https://github.com/RaRe-Technologies/gensim/blob/develop/gensim/summarization/summarizer.py#L79

Best, Fede

fedelopez77 avatar Sep 30 '20 07:09 fedelopez77