Closed krrishdholakia closed 3 years ago
What version are you using of bert-extractive-summarizer?
I also have the same problem. Here is my version of requirements: bert-extractive-summarizer = 0.4.2 transformers = 2.2.2 spacy = 2.3.4 numpy = 1.19.4 torch = 1.7.0+cpu tqdm = 4.54.0
It still worked last week. but, I got the TypeError today. Can you please help me to figure out what's going on in it? Thank you very much!
Thanks for the info. num_sentences
was introduced in 0.5.1. The most recent version for bert-extractive-summarizer is 0.6.1
.
Closing for now. Let me know if you are still having any problems.
Hi @dmmiller612
Could you please tell me why the number of returned sentences are sometimes one less than the set num_sentences parameter?
Example code try num_sentences 5 or 4 or 3 ..:
model = SBertSummarizer('all-mpnet-base-v2')
txt = """
A subset of machine learning is closely related to computational statistics. The study of mathematical optimization delivers methods. Theory and application domains to the field of machine learning. Data mining is a related field of study, focusing on exploratory data analysis through unsupervised learning. Some implementations of machine learning use data and neural networks in a way that mimics the working of a biological brain. In its application across business problems, machine learning is also referred to as predictive analytics.
"""
result = model(txt , num_sentences=5, return_as_list=True)
print(len(result))
4
Thanks
Hi,
trying to follow the num sentences example
result = model(body, num_sentences=3)
the error i'm getting is:
TypeError: __call__() got an unexpected keyword argument 'num_sentences'