# lexrank.js

> Lexrank - text relevance algorithm

Latest version **3.0.0** (published 2021-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install lexrank.js
pnpm add lexrank.js
yarn add lexrank.js
bun add lexrank.js
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-10-03 |
| First published | 2017-03-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Goran Spasojevic |
| Maintainers | gorango |
| Keywords | lexrank, pagerank, content, summarization, natural, language |

## Links

- npm: https://www.npmjs.com/package/lexrank.js
- Repository: https://github.com/gorango/lexrank.js
- Homepage: https://github.com/gorango/lexrank.js#readme
- Issues: https://github.com/gorango/lexrank.js/issues
- npm.io page: https://npm.io/package/lexrank.js

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-10-03
- 2.0.3 — 2021-07-25
- 2.0.2 — 2021-07-24
- 2.0.1 — 2021-07-24
- 2.0.0 — 2021-07-24
- 1.4.1 — 2021-07-24
- 1.4.0 — 2019-07-14
- 1.3.3 — 2018-12-23
- 1.3.2 — 2018-12-23
- 1.3.0 — 2017-03-22
- 1.2.0 — 2017-03-13
- 1.1.0 — 2017-03-08
- 1.0.0 — 2017-03-07

## README

# lexrank.js

[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]

Unsupervised text summarization using the [Lexrank algorithm][paper].

# Usage

Install from npm

```
npm i --save lexrank.js
```

In your script:

```js
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][license] © [Goran Spasojevic][author]

<!-- Definitions -->

[build-badge]: https://github.com/gorango/lexrank.js/workflows/main/badge.svg
[build]: https://github.com/gorango/lexrank.js/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/gorango/lexrank.js.svg
[coverage]: https://codecov.io/github/gorango/lexrank.js
[downloads-badge]: https://img.shields.io/npm/dm/lexrank.js.svg
[downloads]: https://www.npmjs.com/package/lexrank.js
[size-badge]: https://img.shields.io/bundlephobia/minzip/lexrank.js.svg
[size]: https://bundlephobia.com/result?p=lexrank.js
[paper]: https://arxiv.org/abs/1109.2128
[license]: license
[author]: https://github.com/gorango

---
_Source: https://npm.io/package/lexrank.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
