boudinfl / pke

Python Keyphrase Extraction module
GNU General Public License v3.0
1.55k stars 291 forks source link

Error in PositionRank: tuple index out of range #217

Closed artdream-dubai closed 1 year ago

artdream-dubai commented 1 year ago

Now there is an error when working with PositionRank, before it was working. I start the example in "Getting started"->Model parameterization and try to check PositionRank. In step-5 : ranking keyphrase candidates there is the error:

IndexError Traceback (most recent call last) in 3 # 2. graph construction (building a complete-weighted-graph of topics) 4 # 3. rank topics (nodes) using a random walk algorithm ----> 5 extractor.candidate_weighting()

1 frames /usr/local/lib/python3.8/dist-packages/networkx/classes/backends.py in wrapper(*args, *kwds) 132 @functools.wraps(func) 133 def wrapper(args, **kwds): --> 134 graph = args[0] 135 if hasattr(graph, "networkx_plugin__") and plugins: 136 plugin_name = graph.networkx_plugin__

IndexError: tuple index out of range


I kindly ask for your help here, Thank you for this nice research instrument!

ygorg commented 1 year ago

Thanks for this issue ! It is linked to #221 and fixed by #222.