Unsupervised text summarization using the Lexrank algorithm.
Install from npm
npm i --save lexrank.js
In your script:
import lexrank from 'lexrank.js'
const result = lexrank(text)
Nested arrays of paragraphs containing sentences with ranked results.
// paragraphs array
[
// sentences array
[{
weight: <Number(0-1)> // relevance score
text: <String> // original sentence string
index: <Number> // global sentence index
}],
[ ... ]
]
Run npm test
to run tests.
Run npm run coverage
to produce a test coverage report.