english

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package english provides a comprehensive set of rules for English pluralization and singularization. It's the result of a deep dive into English morphology, designed to be highly accurate by respecting the complex hierarchy of its rules.

The core philosophy is that inflection isn't a single step, but a cascade: a word is first checked against a list of truly invariable words (uninflected), then against a list of unique irregular words, and only then is it processed by the general pattern-based rules.

A key principle in this library is the careful distinction between nouns that are sometimes uncountable (like "work") and those that are almost always invariable (like "information"). To allow for correct pluralization of words like "work" into "works" or "permission" into "permissions", the uninflected list is intentionally kept strict and concise.

Sources and references used for curation:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language struct {
	// contains filtered or unexported fields
}

func New

func New() *Language

func (*Language) Name

func (r *Language) Name() string

func (*Language) PluralRuleset

func (r *Language) PluralRuleset() pluralizer.Ruleset

func (*Language) SingularRuleset

func (r *Language) SingularRuleset() pluralizer.Ruleset

Jump to

Keyboard shortcuts

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