All Projects → gertd → go-pluralize

gertd / go-pluralize

Licence: MIT License
Pluralize and singularize any word (golang adaptation of https://www.npmjs.com/package/pluralize)

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to go-pluralize

Pluralize
Pluralize or singularize any word based on a count
Stars: ✭ 1,808 (+2913.33%)
Mutual labels:  pluralization, english, words, pluralize, plurals, singular
Pluralize.NET
📘 Pluralize or singularize any English word.
Stars: ✭ 50 (-16.67%)
Mutual labels:  english, pluralize, singular
similar-english-words
Give me a word and I’ll give you an array of words that differ by a single letter.
Stars: ✭ 25 (-58.33%)
Mutual labels:  english, words
Profane Words
A very long list of English profanity.
Stars: ✭ 95 (+58.33%)
Mutual labels:  english, words
Vocabs
📚 A lightweight online dictionary integration to the command line. No browsers. No paperbacks.
Stars: ✭ 226 (+276.67%)
Mutual labels:  english, words
words-aas
📕 a simple API to generate unique randomized words & phrases.
Stars: ✭ 69 (+15%)
Mutual labels:  english, words
An Array Of English Words
List of ~275,000 English words
Stars: ✭ 114 (+90%)
Mutual labels:  english, words
rhymes
Give me an English word and I’ll give you a list of rhymes
Stars: ✭ 34 (-43.33%)
Mutual labels:  english, words
ety-python
A Python module to discover the etymology of words
Stars: ✭ 110 (+83.33%)
Mutual labels:  english, words
EnglishText.jl
Utilities for English-language quirks in Julia
Stars: ✭ 12 (-80%)
Mutual labels:  pluralization, english
Anki Templates
For language Grammar
Stars: ✭ 70 (+16.67%)
Mutual labels:  english
OpenGNT
Open Greek New Testament Project; NA28 / NA27 Equivalent Text & Resources
Stars: ✭ 55 (-8.33%)
Mutual labels:  english
lingose-notation
The best mnemonics and notational system of English words.
Stars: ✭ 17 (-71.67%)
Mutual labels:  english
MyGoldenDict
My personal goldendict-dictionaries collection
Stars: ✭ 13 (-78.33%)
Mutual labels:  english
rr-organization1
The Organization lesson for the Reproducible Science Curriculum
Stars: ✭ 36 (-40%)
Mutual labels:  english
ToggleWords
Sublime Text 3 Plugin - Toggle words on hotkey
Stars: ✭ 36 (-40%)
Mutual labels:  words
career rush
Um projeto para ajudar pessoas a conquistarem o seu melhor
Stars: ✭ 19 (-68.33%)
Mutual labels:  english
big-phoney
Get phonetic spellings and syllable counts for any english word. Works with made-up and non-dictionary words
Stars: ✭ 65 (+8.33%)
Mutual labels:  english
tudien
Từ điển tiếng Việt dành cho Kindle
Stars: ✭ 38 (-36.67%)
Mutual labels:  english
TALPCo
TUFS Asian Language Parallel Corpus
Stars: ✭ 32 (-46.67%)
Mutual labels:  english

go-pluralize

Build Status Go Report Card GoDoc

Pluralize and singularize any word

Acknowledgements

The go-pluralize module is the Golang adaptation of the great work from Blake Embrey and other contributors who created and maintain the NPM JavaScript pluralize package. The originating Javascript implementation can be found on https://github.com/blakeembrey/pluralize

Without their great work this module would have taken a lot more effort, thank you all!

Version mapping

The latest go-pluralize version is compatible with pluralize version 8.0.0 commit #36f03cd

go-pluralize version NPM Pluralize Package version
0.2.0 - Jan 25, 2022 v0.2.0 8.0.0 - Oct 6, 2021 #36f03cd
0.1.7 - Jun 23, 2020 v0.1.7 8.0.0 - Mar 14, 2020 #e507706
0.1.2 - Apr 1, 2020 v0.1.2 8.0.0 - Mar 14, 2020 #e507706
0.1.1 - Sep 15, 2019 v0.1.1 8.0.0 - Aug 27, 2019 #abb3991
0.1.0 - Jun 12, 2019 v0.1.0 8.0.0 - May 24, 2019 #0265e4d

Installation

To install the go module:

go get -u github.com/gertd/go-pluralize

To lock down a specific the version:

go get -u github.com/gertd/[email protected]

Download the sources and binaries from the latest release

Usage

Code

import pluralize "github.com/gertd/go-pluralize"

word := "Empire"

pluralize := pluralize.NewClient()

fmt.Printf("IsPlural(%s)   => %t\n", input, pluralize.IsPlural(word))
fmt.Printf("IsSingular(%s) => %t\n", input, pluralize.IsSingular(word))
fmt.Printf("Plural(%s)     => %s\n", input, pluralize.Plural(word))
fmt.Printf("Singular(%s)   => %s\n", input, pluralize.Singular(word))

Result

IsPlural(Empire)   => false
IsSingular(Empire) => true
Plural(Empire)     => Empires
Singular(Empire)   => Empire

Pluralize Command Line

Installation

go get -x github.com/gertd/go-pluralize/cmd/pluralize

Usage

Help

pluralize -help
Usage of ./bin/pluralize:
  -cmd string
        command [All|IsPlural|IsSingular|Plural|Singular] (default "All")
  -version
        display version info
  -word string
        input value

Word with All Commands

pluralize -word Empire 

IsPlural(Empire)   => false
IsSingular(Empire) => true
Plural(Empire)     => Empires
Singular(Empire)   => Empire

Is Word Plural?

pluralize -word Cactus -cmd IsPlural

IsPlural(Cactus)   => false

Is Word Singular?

pluralize -word Cacti -cmd IsSingular

IsSingular(Cacti)  => false

Word Make Plural

pluralize -word Cactus -cmd Plural

Plural(Cactus)     => Cacti

Word Make Singular

pluralize -word Cacti -cmd Singular

Singular(Cacti)    => Cactus
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].