Uses a fallback method—based on the NLTK readability plugin by Thomas Jakobsen [email protected] and Thomas Skardal [email protected]. This NLTK plugin is itself based on the algorithm implemented in the Lingua::EN::Syllable perl module by Greg Fast [email protected].
Thanks to them for making their work available.
To use this Java library, you need Java 8 and Maven 3.
Refer to the Maven Central page to find the installation instructions for your build tool or to download the jar directly.
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