Go syllable counter.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.gitlab-ci.yml
.travis.yml
LICENSE
README.md
cornercase.go
cornercase_test.go
count.go
count_test.go
expressions.go
expressions_test.go

README.md

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."
}