textrank
textrank copied to clipboard
Code for original Textrank algorithm (without similarity function optimizations)
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
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