# nlp-syllables-async

> Plugin for nlp_compromise that extracts syllables from words

Latest version **0.1.2** (published 2016-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install nlp-syllables-async
pnpm add nlp-syllables-async
yarn add nlp-syllables-async
bun add nlp-syllables-async
```

## 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.1.2 |
| Published | 2016-08-13 |
| First published | 2016-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | C. Thomas Bailey |
| Maintainers | ctbailey |
| Keywords | syllables, nlp, poetry, writing, linguistics, lyrics |

## Links

- npm: https://www.npmjs.com/package/nlp-syllables-async
- Repository: https://github.com/partials-dev/nlp-syllables-async
- Homepage: https://github.com/partials-music/nlp-syllables-async
- Issues: https://github.com/partials-music/nlp-syllables-async/issues
- npm.io page: https://npm.io/package/nlp-syllables-async

## Dependencies (4)

- [moment](https://npm.io/package/moment.md) ^2.14.1
- [scrape-url](https://npm.io/package/scrape-url.md) ^3.0.0
- [nlp-syllables](https://npm.io/package/nlp-syllables.md) 0.0.5
- [nlp_compromise](https://npm.io/package/nlp_compromise.md) ^6.5.0

## Recent versions

- 0.1.2 (latest) — 2016-08-13
- 0.1.1 — 2016-08-09
- 0.1.0 — 2016-08-09
- 0.0.1 — 2016-07-26

## README

# nlp-syllables-async
A [plugin](https://github.com/nlp-compromise/nlp_compromise/wiki/Plugins) for [nlp_compromise](https://github.com/nlp-compromise/nlp_compromise) that splits words into syllables.

# Features
- Asynchronous: pulls high quality syllable data from the network.
- Cached: avoids making duplicate network requests.
- Promise-based: more fun.
- Uses time-outs: if querying the network takes too long, guesses the syllables using `nlp-syllables`.

# Installation and Usage

Install with `$ npm install nlp-syllables-async`

then

```javascript
import nlp from 'nlp_compromise'
import syllables from 'nlp-syllables-async'
nlp.plugin(syllables)

nlp.termWithSyllables('simplicity').then(term => {
  const syllables = JSON.stringify(term.syllables)
  console.log(syllables)
  // output: ['sim', 'plic', 'i', 'ty']
})

nlp.text('simple is different from easy').termsWithSyllables().then(terms => {
  const allSyllables = terms.map(t => t.syllables)
  console.log(JSON.stringify(allSyllables))
  // output:
  // [
  //  ['sim', 'ple'],
  //  ['is'],
  //  ['dif', 'fer', 'ent'],
  //  ['from'],
  //  ['eas', 'y']
  // ]
})

nlp.term('indeterminacy').getSyllablesAsync().then(syllables => {
  console.log(syllables)
  // output:
  // [
  //  'in',
  //  'de',
  //  'ter',
  //  'mi',
  //  'na',
  //  'cy'
  // ]
})
```

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