syllables

Count syllables in text using a dictionary


Keywords
syllables, parse, text, string, dictionary, find, syllable, language
License
MIT
Install
npm install syllables@1.0.0

Documentation

Syllables Build Status

Syllables are counted using the CMU Pronouncing Dictionary, which uses 4MB of storage.

Install

$ npm install syllables

Usage

const syllables = require('syllables');

syllables('Hello');
//=> 2

syllables('Hi, how are you?');
//=> 4

syllables('sjhljhah aiuoihdal ijiajl');
//=> 0

API

syllables(str)

str

Type: string

Word or sentence to count syllables of. Unrecognised words will have a syllable count of 0.