dmmiller612 / bert-extractive-summarizer

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

Re: number of sentences interpretation in BERTSum #78

Open deeptigoyal opened 3 years ago

deeptigoyal commented 3 years ago

Hi Miller,

I am having issues in understanding how the parameter "number of sentences" helping in retrieving the desired summarized output.

For instance : if I give input as body = """Second, cost associated with our data centers and other operations, including depreciation. And third, hardware-related costs for our Made by Google and Nest family of products. Operating expenses were $13.2 billion, up 27% year-over-year. The biggest increase was in R&D expenses, with the larger driver being headcount growth, followed by the accrual of compensation expenses to reflect increases in the valuation of equity in certain Other Bets. Growth in sales and marketing expenses reflect increases in sales and marketing headcount, primarily for cloud and ads, followed by advertising investments, mainly in search and the Assistant."""

and apply BERTSUM giving parameter number_sentences = 3 I get 2 sentences s output. the screenshot of the same is atached.

bertsumerror

Similarly, other cases such as if i give number_Sentences =2 I get answer as 3 sentences. Can you please help how the number of sentences being interpreted or how the sentences getting split. (I am assuming it splitting at dot.)

Waiting for your reply. Do help. Thanks