Skip to content
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

Lexrank for Single Document #35

Open
alkakhurana opened this issue Sep 30, 2020 · 2 comments
Open

Lexrank for Single Document #35

alkakhurana opened this issue Sep 30, 2020 · 2 comments

Comments

@alkakhurana
Copy link

How can I use this implementation of Lexrank for summarizing a single document?
Attempting this produces the following error -
ValueError: documents are not informative

Thanks in advance
Alka Khurana

@yungsinatra0
Copy link

Have you been able to find a solution for this? I've stumbled upon this issue as well.

@ijaradat
Copy link

The issue is not the single document. The issue is that the code is old and using old python lib. you can fix summarizer.py using ntlk tokenization by replacing lines 117-119 with the following:

for sentence in sent_tokenize(doc):
                words = word_tokenize(sentence)
                doc_words.update(words)

and do not forget to include sent_tokenize and word_tokenize from ntlk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants