Skip to content

gorango/lexrank.js

Repository files navigation

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

About

Unsupervised text summarization using the lexrank algorithm

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy