lexrank.js

3.0.0 • Public • Published

lexrank.js

Build Coverage Downloads Size

Unsupervised text summarization using the Lexrank algorithm.

Usage

Install from npm

npm i --save lexrank.js

In your script:

import lexrank from 'lexrank.js'

const result = lexrank(text)

Returns

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
  }],
  [ ... ]
]

Tests

Run npm test to run tests.

Run npm run coverage to produce a test coverage report.

License

MIT © Goran Spasojevic

Package Sidebar

Install

npm i lexrank.js

Weekly Downloads

10

Version

3.0.0

License

MIT

Unpacked Size

7.94 kB

Total Files

5

Last publish

Collaborators

  • gorango