m09 / syllable-counter

Lightweight library to count syllables in words

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syllable Counter

CI Status Deploy Status Maven Central version codecov

Uses a fallback method—based on the NLTK readability plugin by Thomas Jakobsen thomj05@student.uia.no and Thomas Skardal thomas04@student.uia.no. This NLTK plugin is itself based on the algorithm implemented in the Lingua::EN::Syllable perl module by Greg Fast gdf@imsa.edu.

Thanks to them for making their work available.

Requirements

To use this Java library, you need Java 8 and Maven 3.

Installation

Refer to the Maven Central page to find the installation instructions for your build tool or to download the jar directly.

Usage

The usage is trivial. To retrieve the number of syllables of a word, use the count method:

import eu.crydee.syllablecounter.SyllableCounter;

...

SyllableCounter sc = new SyllableCounter();
int myCount = sc.count("facility");
// myCount holds 4

About

Lightweight library to count syllables in words

License:Apache License 2.0


Languages

Language:Java 100.0%