# @trevor.linton/similarto

> Compares a string against an array of strings and picks the most similar

Latest version **1.0.1** (published 2019-01-04) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @trevor.linton/similarto
pnpm add @trevor.linton/similarto
yarn add @trevor.linton/similarto
bun add @trevor.linton/similarto
```

## 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.0.1 |
| Published | 2019-01-04 |
| First published | 2019-01-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 16.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Trevor Linton |
| Maintainers | trevor.linton |
| Keywords | similar, nlp, like, textmatch, closest, similarto, associated, text, words |

## Links

- npm: https://www.npmjs.com/package/@trevor.linton/similarto
- Repository: https://github.com/trevorlinton/similarto
- Homepage: https://github.com/trevorlinton/similarto#readme
- Issues: https://github.com/trevorlinton/similarto/issues
- npm.io page: https://npm.io/package/@trevor.linton/similarto

## Dependencies (4)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [natural](https://npm.io/package/natural.md) ^0.6.3
- [compromise](https://npm.io/package/compromise.md) ^11.12.4
- [wordnet-db](https://npm.io/package/wordnet-db.md) ^3.1.11

## 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

- 1.0.1 (latest) — 2019-01-04
- 1.0.0 — 2019-01-04

## README

# Similar To

## Find text similar to another peice of text

This is a simple function that takes as a first argument a string and as a second argument an array of strings and returns the string that most closely resembles the original.  

```
const similarto = require('@trevor.linton/similarto')
similarto('I\'m going to france', ['To be or not to be that is the question', 'You dont see that sort of behavior in major appliances', 'I will be traveling to europe'])
	.then((x) => console.log(x))
```

Note, similarto is an async func, if used without `await` keyword, you'll need to use the returned result as a promise.

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