# simple-text-analyzer

> Simple Text Analyzer ===

Latest version **1.2.1** (published 2019-10-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-text-analyzer
pnpm add simple-text-analyzer
yarn add simple-text-analyzer
bun add simple-text-analyzer
```

Provides the command `simple-text-analyzer`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2019-10-20 |
| First published | 2019-10-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 87.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | slowmove |

## Links

- npm: https://www.npmjs.com/package/simple-text-analyzer
- npm.io page: https://npm.io/package/simple-text-analyzer

## Dependencies (4)

- [yargs](https://npm.io/package/yargs.md) ^14.2.0
- [pdfreader](https://npm.io/package/pdfreader.md) ^1.0.6
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [node-easy-docx](https://npm.io/package/node-easy-docx.md) ^0.1.3

## Recent versions

- 1.2.1 (latest) — 2019-10-20
- 1.2.0 — 2019-10-18
- 1.1.0 — 2019-10-17
- 1.0.0 — 2019-10-17

## README

Simple Text Analyzer
===

This small package helps you analyze a text, bringing the most valuable words up front to use as for example tags when publishing.
Available as both cli application as well as code library.

**File support:**
- plain text (txt, rtf, md etc)
- pdf
- docx

### Install

Install the cli app by running `npm -g install simple-text-analyzer`.

Install as a library in your app by running `npm install simple-text-analyzer`.

### Usage as CLI application

```
Usage with local file: -f <file>
Usage with external file: -u <url>

Options:
  --help        Show help                                              [boolean]
  --version     Show version number                                    [boolean]
  -f, --file    A local plain text file                                 [string]
  -u, --url     The url to fetch a plain text file from.                [string]
  -i, --ignore  A json file with an array of words to ignore            [string]
```

**Example:** `simple-text-analyzer -f "my-analysis-article.md`

### Usage as code library

```javascript
const simpleTextAnalyzer = require("simple-text-analyzer");

fs.readFile("text.txt", "utf-8", (err, text) => {
  if (err) return;
  const ignoreList = ["ignore", "these", "words"];
  const result = simpleTextAnalyzer.analyze(text, ignoreList);
  // use the result...
});
```

**analyze** This methods takes the text as its first parameter, and optional an ignore list (array) as a second parameter.
Returns an array of objects `{ name, total }`

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