# mysam-extract

> Extract tags from sentences

Latest version **0.2.0** (published 2016-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install mysam-extract
pnpm add mysam-extract
yarn add mysam-extract
bun add mysam-extract
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-07-14 |
| First published | 2016-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.12.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Luecke |
| Maintainers | daffl |
| Keywords | mysam |

## Links

- npm: https://www.npmjs.com/package/mysam-extract
- Repository: https://github.com/mysamai/mysam-extract
- Issues: https://github.com/mysamai/mysam-extract/issues
- npm.io page: https://npm.io/package/mysam-extract

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.13.1
- [natural](https://npm.io/package/natural.md) ^0.4.0

## Recent versions

- 0.2.0 (latest) — 2016-07-14
- 0.1.0 — 2016-07-13

## README

# mysam-extract

[![Build Status](https://travis-ci.org/mysamai/mysam-extract.png?branch=master)](https://travis-ci.org/mysamai/mysam-extract)

> Extract tags from sentences

Used by MySam's taggin mechanism.

## Example

> npm install mysam-extract

```js
const extract = require('mysam-extract');

const locator = extract.extractor('what\'s the weather in vancouver');

locator.tag({ location: [ 5, 5 ] });

locator.extract('do you know, how is the weather in san francisco')

// {
//   "tags": {
//     "location": [ 8, 9 ]
//   },
//   "extracted": {
//     "location": "san francisco"
//   }
// }

const list = extract.extractor('can you put toothpaste on the shopping list');

list.tag({
  items: [ 3, 3 ],
  list: [ 6, 6 ]
});

list.extract('Please put cat food and apples on the grocery list');

// {
//   "tags": {
//     "items": [ 2, 5 ],
//     "list": [ 8, 8 ]
//   },
//   "extracted": {
//     "items": "cat food and apples",
//     "list": "grocery"
//   }
// }
```

## License

Copyright (c) 2016

Licensed under the [MIT license](LICENSE).

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