Socket
Socket
Sign inDemoInstall

syllable

Package Overview
Dependencies
2
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    syllable

Count syllables in English words


Version published
Weekly downloads
46K
increased by6.85%
Maintainers
2
Install size
65.8 kB
Created
Weekly downloads
 

Readme

Source

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.

  • automated-readability — Formula to detect ease of reading according to the Automated Readability Index (1967)
  • buzzwords — List of buzzwords
  • coleman-liau — Formula to detect the ease of reading a text according to the Coleman-Liau index (1975)
  • cuss — Map of profane words to a rating of sureness
  • dale-chall — List of easy American-English words: The New Dale-Chall (1995)
  • dale-chall-formula — Formula to find the grade level according to the (revised) Dale–Chall Readability Formula (1995)
  • fillers — List of filler words
  • flesch — Formula to detect the ease of reading a text according to Flesch Reading Ease (1975)
  • flesch-kincaid — Formula to detect the grade level of text according to Flesch–Kincaid Grade Level (1975)
  • gunning-fog — Formula to detect the ease of reading a text according to the Gunning fog index (1952)
  • hedges — List of hedge words
  • profanities — List of profane words
  • smog-formula — Formula to detect the ease of reading a text according to the SMOG (Simple Measure of Gobbledygook) formula (1969)
  • spache — List of familiar American-English words (1974)
  • spache-formula — Uses a dictionary, suited for lower reading levels
  • weasels — Formula to detect the grade level of text according to the (revised) Spache Readability Formula (1974)

License

MIT © Titus Wormer

Keywords

FAQs

Last updated on 01 Feb 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc