8000 GitHub - tscole/syllable: Syllable count in JavaScript
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tscole/syllable

 
 

Repository files navigation

syllable

Build Coverage Downloads Size

Syllable count in JavaScript.

Install

npm:

npm install syllable

API

var syllable = require('syllable')

syllable('syllable') // 3
syllable('unicorn') // 3
syllable('hi') // 1
syllable('hihi') // 2
syllable('mmmmmmmmmmmmmmmm') // 1
syllable('wine') // 1
syllable('bottle') // 2
syllable('wine-bottle') // 3
syllable('Åland') // 2

CLI

Usage: syllable [options] <words...>

Syllable count in an English word

Options:

  -h, --help           output usage information
  -v, --version        output version number

Usage:

# output syllables
$ syllable syllable unicorn
# 6

# output syllables from stdin
$ echo "syllable unicorn banana" | syllable
# 9

Inspiration

Based on the syllable functionality found in Text-Statistics (PHP), in turn inspired by Lingua::EN::Syllable (Perl).

Support for word-breaks, non-ASCII characters, and many fixes added later.

License

MIT © Titus Wormer

About

Syllable count in JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%
0