dmmiller612 / bert-extractive-summarizer

Easy to use extractive text summarization with BERT
MIT License
1.39k stars 305 forks source link

Unable to reproduce the examples #24

Closed soumyatanwar closed 4 years ago

soumyatanwar commented 4 years ago

I'm running the code in Google Colab notebook. I made sure I installed the spacy 2.1.3 version.

However, this is the error I'm getting says Summarizer is not callable image

Then I tried to pass the text as an argument to Summarizer which resulted in this, I expected the argument returned to be of string type i.e. the summary text: image

And when I tried to convert the result to a string, I got this: image

What am I getting wrong here? If you could point out if I've misunderstood something, I'd really appreciate it. If you need any other information, let me know :)

dmmiller612 commented 4 years ago

That all should work. However, I am unaware of this google colab notebook. If you wouldn't mind pasting it here, I can take a look.

soumyatanwar commented 4 years ago

Google Colab is just like a Jupyter Notebook, with free GPU resources, that gets saved to Google Drive. I'm sharing a link to the Colab notebook here:

https://drive.google.com/open?id=1BncuWsyEXlPUPafqAUPwK2ausg7rvA4l

dmmiller612 commented 4 years ago

Looks like the wrong summarizer is installed:

Name: summarizer
Version: 0.0.7
Summary: A text summarizer
Home-page: https://github.com/michigan-com/summarizer
Author: Eric Bower
Author-email: neurosnap@gmail.com
License: The MIT License (MIT)
Location: /usr/local/lib/python3.6/dist-packages
Requires: nltk
Required-by: 

this requires pip install bert-extractive-summarizer

soumyatanwar commented 4 years ago

Thanks for pointing that out! It works now :)

rajmati-GM commented 4 years ago

@soumyatanwar could you please paste the sample code that worked for you here ?