-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'degree_centrality_scores' from 'lexrank' #34
Comments
Currently, the
|
Just for anyone who is here with the same problem The import is
with an "s" Also, in the README there is a typo. Change every instance of "thershold" for "threshold" |
I want to install the dev branch of lexrank from requirements.txt. https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch suggests I can use
but this results in installing |
You can point to a specific commit e.g. git+https://github.com/crabcamp/lexrank.git@07bdd1579c408cf73cc822da303734d0a70cf3f7 but the current dev branch seems to be in a broken state where you cannot import lexrank at all. |
@hansharhoff Thank you for the response. I tried adding that to requirements.txt and get the following:
which, of course, is not the version I want. Is it because "the current dev branch seems to be in a broken state where you cannot import lexrank at all"? Can anything be done (without access to pushing changes)? I suppose I could fork it... |
I endend up using this example which has copied the relevant code to a single file: https://github.com/UKPLab/sentence-transformers/tree/master/examples/applications/text-summarization |
@hansharhoff thank you - that worked! |
Works perfectly thanks @hansharhoff |
I am using the bert-extractive-summarizer package. However, sometimes I get +/-inf values as the centrality score. I dug a little deeper and found that the eigenvalues are coming as +/-inf. And this is probably caused by near-zero cosine similarity scores. If I add a constant such as 1.1 with all the cosine similarity scores, I do not get the +/-inf values anymore. |
@hansharhoff thank you! |
Got this issue on MacBook Pro. Python version: 3.7.4
Reproducibility:
The text was updated successfully, but these errors were encountered: