Summary Bot is a quick, light weight and extremely simple to use article summary package.
npm install --save summary-bot
Three easy steps will get you up and running:
- Import it into the file
// ES6
import SummaryBot from 'summary-bot';
- feed it an article [string] and the number of sentences you would like for the summary
SummaryBot(article, 5)
- receive a summary object
Key | Type | Description |
---|---|---|
text | string | summary as a string |
percentReduction | integer | percent of the original article removed from the summary |
bestSentences | array | this will be an array of the top sentences with metadata as to where they appeared in the article |
originalLength | integer | word count of article |
summaryLength | integer | word count of summary |
sentenceCount | integer | returns sentence count for verification |
Developed by Alex Mattson