summanlp / textrank

TextRank implementation for Python 3.
https://pypi.org/project/summa/
MIT License
1.25k stars 260 forks source link

Keywords change on different run for same text #54

Open vertika-19 opened 5 years ago

vertika-19 commented 5 years ago

Everytime you run the program, the set of keywords change. Can you point out why is it happening.

fedelopez77 commented 5 years ago

There are no random components in the algorithm. Can you provide a concrete example?

vertika-19 commented 5 years ago

You can check in this different runs are giving different set of keywords as well as order is also changing.

capture1 capture2

fedelopez77 commented 5 years ago

I tried several runs, with different texts, relaunching the interpreter, and I couldn't reproduce it. I always get the same list of keywords in the exact same order. Are you using the last version of summa, with the last version of scipy and all its dependencies?

vertika-19 commented 5 years ago

Are you using python 2?

fedelopez77 commented 5 years ago

No, the current stable version on Master on this repository, as the one that you can download via pip, are for Python 3. We no longer provide support for Python2

vertika-19 commented 5 years ago

In the first go I tried few things like I created 2 separate virtual environments :

  1. With python 3
  2. With python 2

Freshly installed just summa on these which installed scipy and numpy as dependencies. Installed summa as : pip install summa

In 1. python 3 - problem persists i.e shows different keywords everytime I launch the interpreter and run

In 2. Python 2 - No such problem, keywords set and order is same everytime.

Is it the same with you!?

mingoarte commented 4 years ago

Hello! I'm facing the same error with python 3. Somebody solved this?