syllables

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2017 License: MIT Imports: 2 Imported by: 4

README

syllables Build Status codecov GoDoc

Go port of the JavaScript syllable counter at https://github.com/wooorm/syllable

Install

go get "github.com/mtso/syllables"

Example

Example usage of syllables.In(string) int:

package main

import (
	"fmt"
	"github.com/mtso/syllables"
)

func main() {
	text := "The quick brown fox jumps over the lazy dog."
	syllableCount := syllables.In(text)
	fmt.Printf("There are %v syllables in %q\n", syllableCount, text)
	// Output: There are 11 syllables in "The quick brown fox jumps over the lazy dog."
}

Documentation

Overview

Package syllables provides a Go implementation of the syllable counter from `github.com/wooorm/syllable`

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func In

func In(text string) int

Returns the integer count of syllables in the input string.

func InBytes

func InBytes(b []byte) int

Returns the integer count of syllables in the input byte array.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL