Skip to content
/ inflect Public

Go library to pluralize and singularize English nouns ("cat" <=> "cats" etc.)

License

Notifications You must be signed in to change notification settings

kjk/inflect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package inflect can pluralize ("cat" => "cats", "man" => "men") or singularize ("cats" => "cat", "men" => "man") English language nouns.

API docs are here.

Usage:

import "github.com/kjk/inflect"

inflect.ToPlural("man") // "men"
inflect.ToPlural("men") // "men"

inflect.ToSingular("men") // "man"
inflect.ToSingular("man") // "man"

inflect.IsPlural("cats") // true
inflect.IsPlural("cat")  // false

inflect.IsSingular("cat")  // true
inflect.IsSingular("cats") // false

This is a Go port of https://github.com/blakeembrey/pluralize

About

Go library to pluralize and singularize English nouns ("cat" <=> "cats" etc.)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages