Giter Site home page Giter Site logo

syllable-counter's Introduction

Syllable Counter

CI Status Deploy Status Maven Central version codecov

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.

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

syllable-counter's People

Contributors

booyaa avatar dependabot-preview[bot] avatar m09 avatar nincodedo avatar timkral avatar wfreitag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

syllable-counter's Issues

Does not handle silent 'es' correctly

I've noticed regular 'es' are calculated correctly
cheese = 1
cheeses = 2

However, the silent 'es' seems to return wrong values
bike = 1
bikes = 2 (expecting 1)

List of syllables

Any way to get a list of the syllables in a given string?

Example

Input: "Hello"
Output: ["Hel", "lo"]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.